1.

Determine and output whether number N is even or odd

Answer»

Answer:

Hey Buddy! This code works only in Python.

x = int(input('Enter a number: ')) #TAKE input

#CHECK if the number is even or odd

if x%2 == 0:

   print(x, 'is an even number')

else:

   print(x, 'is an odd number')

HOPE IT HELPS!!



Discussion

No Comment Found