sarahalbaloushi sarahalbaloushi
  • 16-08-2021
  • Computers and Technology
contestada

write a program to check whether the number is odd or even using 'if' statement in python

Respuesta :

belongtoinsarifamily
belongtoinsarifamily belongtoinsarifamily
  • 16-08-2021

Answer:

Python Program to Check if a Number is Odd or Even :

num = int(input("Enter a number: "))

if (num % 2) == 0:

print("{0} is Even number". format(num))

else:

print("{0} is Odd number". format(num))

Answer Link

Otras preguntas

Phil is paid £240 per week each week he saves on quarter of his pay how much does he save each week
Which of the following quotations from the talk illustrates hyperbole or intentional overstatement
Jan hears that the city council is considering a youth curfew. She worries that the curfew might interfere with her afterschool job. She does not think it is fa
After it is purchased, the value of a new car decreases $4000 each year. After 3 years, the car is worth $18,000. What was the original value of the car?
If 5 friends want to share 1.25 of a pizza evenly,how much pizza would each person get?
Which statements best explain how the theme develops over the course of the narrative no filter
which words convey the hard work involed in cleaning up after a war
An empty bucket is placed under a faucet dripping at a constant rate 4 millimeters per minute. With the given information, which of these statements is a reas
1. The fossil shown in this photo is of a Basilosaurus. Its skeletal features suggest that it spent its entire life swimming in the ocean. Look at the environme
Does anyone know any good instrumental songs by antiserum and mayhem?