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

Lipids are organic macromolecules that serve a variety of purposes. What is the most important role of lipids? A. to oxygenate blood B. to store energy C.
if the area of a triangular base prism is 11 cm² and the height of the prism is 12 cm, what is the volume of the prism?
A pre-1964 quarter, made predominantly of silver (density = 10.5 g/ml), was determined to have a mass of 6.25 g. What is the volume of the quarter?
1. Jillian Knits hats for her family and friends. In the week, she knits 4 hats, the next week, she has some help and together, they knit four times as the week
How was the farmers alliance form
Which of the following is an example of a rational number that is not an integer? a. −3 b. 1 c.1/3 d.8
Place the following numbers in order from least to greatest. 300, 0, -200, 200, -150, -250, 150
How many solutions are there to the equation shown below? 2x + 8 = 2(2+4) one solution infinite solutions no solutions Submit
a piece of metal will feel colder than a piece of wood at the same temperature.why?
Have you ever noticed what happens to ice cubes if you leave them out? The ice changes into a liquid. Or maybe you've noticed what happens to a pot of water bei