Welcome folks today in this post we will be looking whether the given number
is odd or even in python. All the full source code of the application is shown below.
Get Started
In order to get started you need to make an app.py
file and copy paste the following code
app.py
1 2 3 4 5 6 7 8 |
# Python Program to check if a Number is Odd or Even number = int(input(" Please Enter any Integer Value : ")) if(number % 2 == 0): print("{0} is an Even Number".format(number)) else: print("{0} is an Odd Number".format(number)) |
Now you can see that we are taking the input
from the user and then checking if the number is even
or odd
Now just type the below command to execute the python script
python app.py