Python 3 Script to Check Whether a Number is Odd or Even Full Tutorial For Beginners

Python 3 Script to Check Whether a Number is Odd or Even Full Tutorial For Beginners

 

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

 

See also  Python 3 BeautifulSoup4 Script Print the Names of all HTML Tags in Given HTML5 Webpage Using Document Tree

app.py

 

# 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

See also  Python 3 OpenCV Script to Add Motion Detection Blur Effect to Image in Horizontal & Vertical Direction Using Numpy Library Full Project For Beginners

 

python app.py

 

Leave a Reply