1. Home
  2. /
  3. Blog
  4. /
  5. Python Program to Check if a Number is Odd or Even
Python

Python Program to Check if a Number is Odd or Even

September 27, 2022 1 min read 2,282
Python Program to Check if a Number is Odd or Even
num = int(input("Enter a number: "))
if (num % 2) == 0:
   print("{0} is Even".format(num))
else:
   print("{0} is Odd".format(num))
Share:
Read next

Related articles