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

Which body part belongs to the circulatory system?
few questions explain too, very confused PLEASE HELP 1. twice the difference between a number and ten 2. if 5 is subtracted from twice a number the result is 11
What's is an example of a homeostatic response that helps an organism survive
What do two equivalent expressions always have in common?
What's is an example of a homeostatic response that helps an organism survive
1.What Canadian landform covers about half of the country? A)the Interior Plains B) the Canadian Shield C) the St. Lawrence Lowlands D) the Yukon Territory 2.Wh
What is the percent of 110 to 275
how did western nations come to dominate much of the world in the late 1800s
by what means did king Leopold 2 of Belgium colonize central Africa
Lance wants to find the total length of three boards. he uses the expression 3 1/2+2+4 1/2 how can Lance rewrite the expression using both the associative and c