Write a simple program to accept a value from the user and
display whether it is Even or Odd.
Answers
Answered by
19
num = int(input("Enter a number: "))
mod = num % 2
if mod > 0:
print("This is an odd number.")
else:
print("This is an even number.")
Similar questions