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

help help help help!
Expand the expression 2(r - 4) + 5(r + 2). Express your answer in simplest form
Social needs are acquired through?
Approximately how many miles apart are Petrograd and Moscow ? A. 200 B. 350 C. 500 D. 650
Expand the expression 2(r - 4) + 5(r + 2). Express your answer in simplest form
write 540 as a product of prime numbers
The volume of a rectangular prism is 270 cubic centimeters. The height of the prism is 5 centimeters. What should the length and width of the prism be? Explain
how were the oregon and santa fe trails different ?
Hello. For my french class I have to write a letter to my french friend. In this letter I have to talk about spending my holiday at his house. (for example: wha
how were the oregon and santa fe trails different ?