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

Which of these is a problem that increases as the human population increases? A. the amount of Sun hitting the Earth B. the amount of land needed to grow food C
The classical period was considered to be A: An age of reason and enlightenment B: A time of few scientific and artistic achievements C: A time when technology
Solve by the elimination method. [tex]4x+8y=40\\-4x+y=14[/tex]
A bag contains 42 red, 45 green, 20 yellow, and 32 pirple candies. You pick one camdy at random. Find the probability that it is green.
This student is listening to MP3 files. What two needs or wants does this wave technology meet? A. To share music and podcasts easily B. To hide or erase messag
Classify the following triangle
4) A force of 100 N is applied to the wrapped present, giving it an acceleration of 2 m/s2. What is the mass of the object? Please help me nowwww!!!!!!!!
1.4.2 Test (CST): Computer-Scored Unit Test Question 5 of 25 Technology can have good and bad effects. What is a bad effect of spraying
How Is The Fruit Like A Dichotomous Key?
whats most expensive car payments or car insurance and why