write a python program to accept the number from the user and check whether it is odd or even.display the appropriate message accordingly
Answers
Answered by
8
Python Program to Check if a Number is Odd or Even
- num = int(input("Enter a number: "))
- if (num % 2) == 0:
- print("{0} is Even number". format(num))
- print("{0} is Odd number". format(num))
Answered by
83
Answer:
Python Program to Check if a Number is Odd or Even
- num = int(input("Enter a number: "))
- if (num % 2) == 0:
- print("{0} is Even number". format(num))
- print("{0} is Odd number". format(num))
Similar questions