Thursday, February 4, 2021

PYTHON PROGRAM TO CHECK WHETHER THE GIVEN INPUT IS ODD OR EVEN

 


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:6

        6 is even

1 comment:

IIT-Madras invites applications second batch of online data science programme, JEE scores not needed

IIT-Madras invites applications second batch of online data science programme, JEE scores not needed As a part of the application process, ...