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

The following statements about carbon dioxide are true EXCEPT a. It can be prepared by the action of acid on CaCO₃ b. It is used in fire extinguishers c. It d
1. What is the respiratory structure of a millipede? A. book lungs B. tracheal tube C. gill slits 2. what is the respiratory structure of a spider? A. gills B.
A car that travels from point A to point B in four hours, and then from point B back to point A in six hours. The road between point A and point B is perfectly
Many colonial people volunteered to fight for the Allied forces because they hoped their service would win their colony's ____
7x+3y=22 4y=20 I need to know how to write this equation out with the answer
which inequality is equivalent to 7x-2y> 8. A) y> 7/2x+8 b) y>-2/7x+8/7 c) y <7/2x-4 d) y <-2/7x-4/7 (whats a Inequality? )
What is 68 divided by the square root of 4
Is STM semantically or acoustically encoded??
Which of the following categories includes the most distantly related organisms? (A) family (B) species (C) class (D) genus (E) order
7x+3y=22 4y=20 I need to know how to write this equation out with the answer