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

Can someone pls help ​
A hemispherical bowl of radius r contains water to a depth h. Give a formula that you can use to measure the volume of the water in the bowl.
what is -(5x-8)=3(x-2)+14​
If A, B, and C are integers between 1 and 10 (inclusive), how many different combinations of A, B, and C exist such that A
Need help this and I need both them to show work
A disadvantage of using an arithmetic mean to summarize a set of data is that __________. Select one: a. The arithmetic mean sometimes has two values b. It can
Why is the muromachi period considered a fragmented part of Japanese history ?
Pete wants to make turkey sandwiches for tow friends and himself.He wants each sandwich to contain 3.5 ounces of turkey.How many ounces of turkey does he need
Today the regulation of campaign finances in Texas is limited to the requirement that all candidates and PACs file reports with the _________.
Which of the following factors made it more likely that similar individuals would mate with each other? Check all that apply: O Selectivity in choosing mates.