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

What is the study of the influence of stars and planets on your future?
What is the density of helium in grams per liter?
can someone explain what it mean???
where is augsberg on the map
Identify the the key events following Muhammad's death and the reasons for the split between the Shi'so and Sunni Muslims.
Round each of the rainfall to the nearest tenth
Jean wrote two correct variable expressions to represent the phrase “the quotient of a number and 3.” Which variable expressions could Jean have written? Sele
the heliocentric theory is best described as a theory that identifies the sun as the center of the universe, with planets revolving around it identifies the ear
All mass movements on Earth, landslides, slumps, creep, and avalanches for example, are caused by what action force? A) gravity B) inertia C) friction D) cen
Evaluate the expression. 7 · (8 + 3) A. 18 B. 29 C. 59 D. 77