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

Who did the British fight for in the revolutionary war ?
One way to inscribe an equilateral triangle in a circle is to first inscribe
According to the philosopher David Hume, the difference between humans and apes lies primarily in their ability to _____.
what happened because of the Zenger and Cosby court case in colonial New York
Benchmark 14.01-4.51
How do you solve each system using the elimination method?
what is the purpose of vesicles
Why dividing by a whole number the same as multiplying by a unit fraction with that number as its denominators?
Factor the following number and give the steps 4a+12b-20
The americans formed a republic, or a government in which people rule in what way