28 Program to find whether a no is even or odd in Python

Program:

#program to find whether a no is even or odd



x=int(input("Enter a no:"))



if(x%2==0):

    print(x,"is a Even no")

else:

    print(x,"is a odd no")


Output:

Program to find whether a no is even or odd in Python


Previous
Next Post »