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

How do you write 30,000 as a whole number
what was the name of the series of laws put in place to encourage the 13 English colonies to trade with England
Chemical reactions are more likely to happen when _____.
The numbers of pages read in books by fourth graders and by seventh graders are shown below: Fourth Grade: 87, 95, 76, 148, 104 Seventh Grade: 183, 187, 204, 21
Solve the following equation for x: 1,000(x – 2) = 75,000 A. 7 B. 770 C. 7,700 D. 77
Normal line to the curve y=ln(2x+a) at x=1 is perpendicular to x-4y+2 = 4ln3. Find the value of a.
how far is it to the stars
Can someone help me understand this?
predict the shape of a population growth curve for a game park in which a male and female rhinoceros are released
Suppose that you find the volume of all the oceans to be 1.4×109km3 in a reference book. To find the mass, you can use the density of water, also found in this