1# Python program to check if the input number is odd or even.
2# A number is even if division by 2 gives a remainder of 0.
3# If the remainder is 1, it is an odd number.
4
5num = int(input("Enter a number: "))
6if (num % 2) == 0:
7 print("{0} is Even".format(num))
8else:
9 print("{0} is Odd".format(num))
1m = int(input("Enter number"))
2if m % 2 == 0:
3 print(m,"is an even number")
4else:
5 print(m,"is an odd number")
6
7
1num = int(input("Enter a number: "))
2if (num % 2) == 0:
3 print("{0} is Even number".format(num))
4else:
5 print("{0} is Odd number".format(num))
1num = int(input("Enter a number: "))
2if (num % 2) == 0:
3 print("{0} is Even".format(num))
4else:
5 print("{0} is Odd".format(num))
6