Write a python program to test whether a given number is even or odd using if-else statement.

2)a)Write a python program to test whether a given number is even or odd using
if-else statement.


a=int(input("Enter the munber:"))

key=a%2

if  key==0:

        print("The given number is even")

else:

        print("The given number is odd")

Comments