Python program to check whether a number is even or odd

Python program to check whether a number is even or odd. In Python, this program can determine whether a value is odd or even. Small children should figure out which number is odd and which is even, but they must learn how to do so in a programming language.

a = int(input("Enter the number to find odd or even "))
if (a % 2) == 0:
print("{0} is Even".format(a))
else:
print("{0} is Odd".format(a))

Output:

Enter a number: 45                                                                                                            

45