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
Result
Thus, to write a python program that evaluates and prints the results of conditional statements and the output is verified successfully.