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

Solve by factoring: 8p2 - 64p = 0
In what way did loyalty to the United States factor into anti-catholic sentiment during the 1800s?
What is Martinson's purpose in the article titled "Franklin Delano Roosevelt and the New Deal"?
How many electors must a presidential candidate secure in the electoral college to be elected president of the united state?
why do scientists believe that life first emerged from the ocean and onto land well after the ancestors of modern day cyanobacteria populated the earth
If 2 of the sides of a rectangle each have a length of 5 and the area of the rectangle is 40, what is the length of the other two sides?
In the united states, about _____ out of 10 television programs portray violence, usually glamorized, glorified, or trivialized.
Keera decided to investigate how the growth of plants is affected by the time of day it is watered. She placed an equal amount of potting soil in three identica
The falling action of "The Black Cat" appears during which part of the story?
which of the following words shows a correct plural form beaches bunnies bush's lifes