Program to check whether a number is even or odd.

Code:

num = int(input("Enter a number: "))

if (num%2==0):

    print("Entered number is even!")

else:             

    print("Entered number is odd!")

 

Output:

Comments

Popular posts from this blog

Practical No. 3: Write a simple Python program using operators : Arithmetic ,Logical ,Bitwise Operators. ((MSBTE Pratical Question))