Python program to check the given number is even or odd
gd.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
godarda@gd:~$ python3 gd.py
__________________________________________
Program for even-odd test of a given number
__________________________________________
Enter a number -5005
-5005 is ODD number
__________________________________________
godarda@gd:~$ python3 gd.py
__________________________________________
Program for even-odd test of a given number
__________________________________________
Enter a number 5050
5050 is EVEN number
__________________________________________
Dear User, Thank you for visitng GoDarda. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.