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

On a new construction site, an electrician can install a new light fixture in 20 minutes. A project calls for 24 new fixtures to be installed on each of 4 floor
Do you think then solid can undergo convection
In terms of weather, what kind of boundary does the line labeled X represent? A. occluded front B. stationary front C. cold front D. warm front
Why did the french revolution happen and who's fault was it
Jennie had $300. Then she spent $15 on a new shirt. What percent of the money does Jennie have left
How do I do trebuchet calculations????? Help me please
what rule does static electricity follow
where are the three parts of an atom located
A recipe call for 2 cups of water for every 5 cups of flour. How many cups of water are needed for 1 cup of flour? A. 2 1/2 cups B. 2 cups C. 1/2 cup D. 2/5 cup
A generator stores electric current. Explain why you agree or disagree with this statement