honryyy honryyy
  • 01-01-2021
  • Computers and Technology
contestada

Write a program that reads an integer and determines and prints whether it is odd or even.

Respuesta :

Cytokine
Cytokine Cytokine
  • 01-01-2021

num = int(input("Enter a number: "))

print(str(num)+" is even" if num % 2 == 0 else str(num)+" is odd")

I wrote my code in python 3.8. Best of luck.

Answer Link

Otras preguntas

answers please very desperate
State farms in communist Europe were run by
Which statement best describes the power of government provided by the articles of confederation? A) The national government held most of the power. B) Congre
Which are the best examples of types of molecules used for energy storage by organisms? Choose all answers that are correct. A. proteins B. carbohy
Which place was more likely to rely on slave labor?
Under feudalism, an aristocrat would give vassals land in an agreement in which the vassals would then give protection to the lord. a. True b. False
Why did Greeks protest against their government in 2012?
what's the difference between titanium and steel
Please answer the question from the attachment.
Can someone please help me