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

True or false: student loans often don't require you to start paying them back until after you've completed the course(s). a.true b.false
How did the capture of Vicksburg contribute to the Union victory in the Civil War?
what do you need to start a new business
What one concept does the Navy instill in SEAL recruits? Why is this so important?
An _____ is a drug that mimics or increases a neurotransmitter's effects, whereas an _____ is a drug that blocks a neurotransmitter's effects. agonist/antagonis
What was Christina Aguilera like as a child.
How did the colonists respond to the unfair British system of mercantilism? A: They began to source more agricultural crops for business. B: They began to chang
If a solution of hf (ka = 6.8 10-4) has a ph of 3.67, calculate the total concentration of hydrofluoric acid.
why is it important to remember historical events, especially the Holocaust? what purpose does historical remembrance serve?
How many molecules of carbon dioxide are in 95 grams of carbon dioxide (co2)?