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

What is the length of the third side of the window frame below? (Figure is not drawn to scale.) A picture of a right triangular window frame is shown. The longe
Please Fill in the Following
help solve! stuck on factoring
If you join a professional society, you can expect to _____. A. have access to current advances in your field B. network with peers C. have a group who will adv
Geometry pls help will give 30 points
Which represents the solution(s) of the system of equations, y + 4 = x2 and y – x = 2? Determine the solution set by graphing.
I need to know what the answers is
What is the best way to apply for the largest number of available grants?
how did the "new media" affect American life?
The volume of a cube with a side length of 1 foot is cubic foot, or cubic inches. So, 1 cubic foot is equal to cubic inches.