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

you have a standard deck of 52 cards. you pick one card and then, with out putting the first card back, you pick a second card. what is the probability that bot
What is the least common denominator for 5/6 and 3/8. 3/4 and 6/7
Why is sodium sulphate hemihydrate called as "Plaster of Paris"?
Mini-Project: Cents and the Central Limit Theorem 1. Collect a sample of at least 50 pennies by setting aside all the pennies you receive in change for severa
What were the major causes of WWII? Please include at least 4 answers.
you have a standard deck of 52 cards. you pick one card and then, with out putting the first card back, you pick a second card. what is the probability that bot
What are the functions of receptors in our body? Think of a situation where receptors do not work properly. What problems are likely to arise?
The function of the eardrum in the middle ear is to
What were the major causes of WWII? Please include at least 4 answers.
Mini-Project: Cents and the Central Limit Theorem 1. Collect a sample of at least 50 pennies by setting aside all the pennies you receive in change for severa