programming-examples/python/_Basics/Python Program to Check if a Number is Odd or Even.py

5 lines
136 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))