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

write words to match the expression. 24- ( 6+3)
Which two numbers have a difference of 5 and a product of 3.36???
what other areas beside egypt did the new kingdom pharoahs conquer
Which two numbers have a difference of 5 and a product of 3.36???
what other areas beside egypt did the new kingdom pharoahs conquer
If you are writing a persuasive essay in favor of banning vending machines in schools, which is a counterargument you might anticipate?
which city was located nearest the nile river delta
write words to match the expression. 24- ( 6+3)
what other areas beside egypt did the new kingdom pharoahs conquer
what other areas beside egypt did the new kingdom pharoahs conquer