Program to find odd or even number - Coder's point

Saturday, June 1, 2019

Program to find odd or even number

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

 OUTPUT:  
 Enter a number: 34  
 34 is Even  
 Enter a number: 23  
 23 is Odd  

No comments:

Post a Comment