Odd Even Number Program – Python

Python Program to Check Odd Even Number

A number which is divisible by 2 is called Even Number.

A Number which is not divisible by 2 is called Odd Number

To understand this example, you should have knowledge of following Python programming topics:

Source Code : Python Odd-Even Program

# Odd and Even Python Program
# Eg: Odd - 1, 3, 5, 7, …
# Eg: Even - 2, 4, 6, 8, …

num = int(input("Enter a number: "))
if num % 2 == 0:
    print("Number is Even")
else:
    print("Number is Odd")

It’s also available on GitHub – https://github.com/studygyaan/python-tutorial/blob/master/Python-Odd-Even.py

https://youtu.be/MCjhRznherE

Warning: mysqli_query(): (HY000/1021): Disk full (/dev/shm/#sql_5a0_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /home/u862442310/domains/studygyaan.com/public_html/wp-includes/wp-db.php on line 2024
«

Warning: mysqli_query(): (HY000/1021): Disk full (/dev/shm/#sql_5a0_0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /home/u862442310/domains/studygyaan.com/public_html/wp-includes/wp-db.php on line 2024
» 

Leave a Reply

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