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

Describe three ways in which science benefits society.
It is impossible for those who have good intentions to have a cultural misunderstanding. Please select the best answer from the choices provided T
66/5=13R1 write as mixed number
Which of these is a main organ in the nervous system? a. lungs b. skin c. heart d. brain
Which of the following was not a personality trait which helped Stalin rise to power? a. Shrewdness c. Manipulativeness b. Cunning d. Mercifulness
Who is the president of Russia? --- Please help!
Li wants to buy a jacket that is originally priced at $65.00 today the store is advertising the jacket for 40% off the oringinal price what is the sale of rhe j
What is the main purpose of the closing in a speech presentation? A. Introduce thesis statement B. Provide evidence and detail to support ideas C. Tell audienc
Which of the following fractions would become a repeating decimal? a.1/8 b.3/4 c.27/36 d.7/9 e.5/8
Which of the following types of energy originates below Earth's surface? A. electrical energy B. geothermal energy C. mechanical energy D. electromagnetic energ