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 are 3 different ways to solve the equations
Which statement is true of The Federalist Papers? A. The writers were careful to avoid the topic of slavery. B. They were published under the pseud
Which of the following best describes vertical integration? A. the control of production from raw materials to sale and production B. the destruction of an e
tan(-x)csc(-x)/sec(-x)cot(-x) simplify the expression
what are the base sequences in trna called? exons anticodons introns codons
write the expression as a single logarithm
tan(-x)csc(-x)/sec(-x)cot(-x) simplify the expression
solve for yA. 8B. [tex]3 \sqrt{7} [/tex]C. [tex]4 \sqrt{7} [/tex]D. 12
If the supply of a product increases, thena. more will be purchased at the same priceb. the price of the product must have declinedc. producers are willing to a
Which of the following requirements to earn a bachelors usually takes around 22 courses to complete?