Python Program to Check Even and odd Number

Spread the love

In this tutorial, you will learn how to write code for Even and Odd number in Python.

print("Python program to find Even and odd Number number ") num = int(input("Enter a number: ")) if (num % 2) == 0: print("{0} is Even".format(num)) else: print("{0} is Odd".format(num))

Output 1:

Python program to find Even and odd Number number

Enter a number: 11
11 is Odd

Output 2:

Python program to find Even and odd Number number

Enter a number: 22
22 is Even

admin

admin

Leave a Reply

Your email address will not be published. Required fields are marked *