sarahalbaloushi sarahalbaloushi
  • 16-08-2021
  • Computers and Technology
contestada

write a program to check whether the number is odd or even using 'if' statement in python

Respuesta :

belongtoinsarifamily
belongtoinsarifamily belongtoinsarifamily
  • 16-08-2021

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))

else:

print("{0} is Odd number". format(num))

Answer Link

Otras preguntas

1. Ca atomic number 2. H2O fission 3. nuclear decay element 4. nuclear synthesis fusion 5. η compound 6. positive charge electron 7. e neutron 8.
The Monitor defeated the Merrimac at Hampton Roads in the first battle of the Civil War. a. True b. False
Please need help "Find 135% of 64."
Which economic term describes a situation where one company controls all the means of production of a product and can set its own price?
5. -4n + 7 + 2n =1 A.1 B.3 C.-3 D.4 6.4(y - 4) = 8 A.-2 B. 2 C. 4 D. 6
What is half of 144?
In the unit cell of galena, six square faces of equal size each form 90 degree angles with every adjacent face. What type of crystal system is this? tetragonal
The major theme of "Life without Principle" is A. freedom. B. religion. C. economics. D. government.
Who enforced the laws of Spain with their armies in the settlements? the colonists the viceroys the king
An earthworm has a complete digestive system. How does the earthworm remove undigested food?