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

Reggie Turner worked 4.5 hours on Monday, from 9:45 am to 3:30 pm on Wednesday, and from 11 am to 3 pm on Friday. What are his total hours for the week?
Solve for the missing variable - 24 + 6k 5(1 + 7k)
At what rate percent per annum will a sum of money double itself in 5 years​
which of the following is closest to 2cm? a . the width of your pinky finger b. the length of a dollar bill c. the length of a small paperclip
0 . 12 + 14 . 6 Pls help​
Plz help this is thu tomorrow ​
Based on information in the article, the reader can predict that A. more dance companies will open around the world as an increasing number of Deaf students lo
4x-3 - 2x +6=2x +3 i forgot
[tex]-\frac{7}{5} + \frac{5}{7}[/tex]How do you solve this?
Translate to an inequality. "A number m is at most 2"