20. Write a Python program to check whether a number is even or odd.

Solution :- 

Static :- 

a =25
if a %2 == 0:
print(“Even number “)
else:
print(“Odd number”)

 

Output :- 

 

Dynamic :- 

a = int(input(“Enter the number :- “))
if a %2 == 0:
print(“Even number “)
else:
print(“Odd number”)

Output :-