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!
Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]


Join Our Facebook Group


Share this example


Download Android App





codesadda.com

Codesadda.com 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