Python program to check the given number is even or odd
kw.py
print("__________________________________________")
print("Program for even-odd test of a given number")
print("__________________________________________")
n=int(input("Enter a number "))
if(n%2==0):
    print(n,"is EVEN number")
else:
    print(n,"is ODD number")
print("__________________________________________")
Output
kodingwindow@kw:~$ python3 kw.py
__________________________________________
Program for even-odd test of a given number
__________________________________________
Enter a number -5005
-5005 is ODD number 
__________________________________________

kodingwindow@kw:~$ python3 kw.py
__________________________________________
Program for even-odd test of a given number
__________________________________________
Enter a number 5050
5050 is EVEN number
__________________________________________
Advertisement