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 does an unconformity in a sequence of rock layers reveal about geologic history? A. A rock layer must have turned upside down. B. A layer of rock might hav
Use log b 2=0.693 and /or log b 7 = 1.946 to find log b 14
if you were going to make segment marks on a chewy fruit worm without any marks,what would be the advantage or disadvantage of using a prime number of segments?
why did the mexican revolution mostly likely happen despite the reform efforts of Porfirio Diaz a.farmers and workers had no reason to use railroads b.diaz did
What are four physical changes a candle undergoes when a part of it is broken off?
You are at the music store to buy some CDs. You have $45 to spend and the store sells CDs for $12.99 each.Write an inequality that represents the number, n, of
How did the Iroquois eventually upset the balance of power between the French and the British?
How can you use an equation to make a prediction from a pattern? Equation > pattern > prediction What are some predections
what means that a material has spaces that allow water to seep through it?
Find the slope of a line that is parallel and the slope of a line that is perpendicular to each line whose equation is given. Please only do number one and show