Python program to take a number as input and tells its even or odd number


Following program shows you how to take a number as input and tells its even or odd number.
This program divides input by 2, If remainder is zero it prints even otherwise it prints odd

number = int(input("Please enter a number:"))
if (number % 2 == 0):
	print("even")
else:
	print("odd")

Output:

Example1:

Please enter a number: 12
even

Example2:

Please enter a number: 33
odd