Monday, July 27, 2020

Write a Program to Check if a Number is Odd or Even in Python.

 Number is Odd or Even in Python.


number = int(input("Enter a number :: "))  
if (number % 2) == 0:  
   print("{0} is Even number :".format(number))  
else:  
   print("{0} is Odd number :".format(number))  


OUTPUT

Enter a number :: 58
58 is Even number :

No comments:

Post a Comment

Please do not any spam link in Comment Box