Skip to content

dharsansuryas-debug/python-module1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Conditional Statements in Python: Even or Odd Checker

🎯 Aim

To write a Python program to check whether the given number is even or odd using if...else statements.

🧠 Algorithm

1.Get an input from the user.

2.Convert the input to an integer and store it in a variable a.

3.Use the modulo operator % to check if a % 2 == 0.

4.If true, print "EVEN".

5.Else, print "ODD".

6.End the program.

🧾 Program

num = int(input())

if num%2==0:

print("EVEN")

else:

print("ODD")

Output

image

Result

Thus, to write a python program that evaluates and prints the results of conditional statements and the output is verified successfully.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors