Computer Science, asked by idrc, 3 months ago

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 Anonymous
8

\bf\underline{\underline{\blue{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))
Answered by GlamorousAngel
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