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

how do you balance __H2SO4 + __B(OH)3 --> __B2(SO4)3 + __H2O
Hey guys, I need 5 sentences!¿Prefieres viajar en coche, en tren, en barco o en avión? ¿Por qué?
Hey guys, I need 5 sentences!¿Prefieres viajar en coche, en tren, en barco o en avión? ¿Por qué?
how do you balance __H2SO4 + __B(OH)3 --> __B2(SO4)3 + __H2O
What are the advantages and disadvantages of globalization
how do you balance __H2SO4 + __B(OH)3 --> __B2(SO4)3 + __H2O
Hey guys, I need 5 sentences!¿Prefieres viajar en coche, en tren, en barco o en avión? ¿Por qué?
What are the advantages and disadvantages of globalization
Hey guys, I need 5 sentences!¿Prefieres viajar en coche, en tren, en barco o en avión? ¿Por qué?
What are the advantages and disadvantages of globalization