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

Which of the following human activities can increase the risks of flooding? a. cultivation b. planting trees c. soil management d. widening rivers
how did geography influence the location of European colonies?
how many times is 5 bigger than 0.5?
how many feet does 5 yards equal
Why did the Spanish explore and colonize New Mexico and Florida in the 1600s?
Which of the following is NOT an example of a liquid asset? a. cash c. a certificate of deposit b. travelers’ checks d. a checking account
Many of the people who have come to Mexico City have ended up living in areas _____.
9. What is the setting of "The Little Match Girl"? A. A wintry city street B. A place in the matchseller's imagination C. The matchseller's attic home D. The ma
Express the number 50 and 25 different ways
2. What two features must a sample have if it is to accurately represent a population?