Python Program to Check Whether a Number is Odd or Even



In this program we will take number from user as input and check if the entered number is odd number or even number.



  1. #check whether a number is odd or even
  2. a=int(input("Enter an integer: "))
  3. if(a%2==0):
  4. print("Given integer is even")
  5. else:
  6. print("Given integer is odd")

Output


Output!