Write a program to input a number from the user and find whether it is even or odd.
Display suitable messages
Answers
Answered by
2
Answer:
a = int(input("Enter a number"))
if(a % 2 == 0):
print("The number is even")
else
print("The number is odd")
Answered by
2
Question:-
Write a program to input a number and find whether it is odd or even.
Program:-
This is written in Python.
n=int(input("Enter a number: "))
if n%2==0:
print("Given number is Even. ")
else:
print("Given number is Odd. ")
Similar questions