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! is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube