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

Marika and Freddy sold 70 homes for Ron Realty. If Marika sold 2.5 times as many homes as Freddy, how many homes did each sell?
Which equation has the same y-intercept as y=4x-3?a. y-3=x              b. y=8x+3    c. 3-y=4x      d. y=-3+8xWhich of the following is the equation of the line
Prove that (x^5)-(x^2)+2x +3=0 has at least one real root. Prove that x=cosx has at least one solution.
Which equation has the same y-intercept as y=4x-3?a. y-3=x              b. y=8x+3    c. 3-y=4x      d. y=-3+8xWhich of the following is the equation of the line
Which equation has the same y-intercept as y=4x-3?a. y-3=x              b. y=8x+3    c. 3-y=4x      d. y=-3+8xWhich of the following is the equation of the line
(10y^3+20y^2+55y)/5y
How were life forms affected by the rise in atmospheric oxygen levels that began 2.2 billion years ago?
Prove that (x^5)-(x^2)+2x +3=0 has at least one real root. Prove that x=cosx has at least one solution.
Historians of china have traditionally dated the beginning of Chinese civilization to the founding of the what??
Can someone use the word delta in a sentence