Write a program that reads an integer and determines and prints whether it is odd or event. [Hint: Use the remainder operator. An even number is a multiple of two. Any multiple of two leaves a remainder of zero when divided by 2.].
number = float(input("input number: "))
if(number % 2 == 0):
print("the number is even")
else:
print("the number is odd")
Comments
Leave a comment