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

About ten thousand years ago, climate change began to impact early humans’ lives. How did the climate change? It got colder. It got warmer. It got wetter. It go
dave has a box of pencils 5 are green, 12 are brown, 6 are yellow, and 4 are blue. if he selects a pencil at random, which color pencil would he be at least lik
Marcel and Floyd are playing games at an arcade. Marcel has $8.25 and is only playing $0.25 games. Floyd has $9.75 and is only playing $0.75 games. Jorge wants
during what century did the Industrial Revolution begin?
Given x^4 − 4x^3 = 6x^2 − 12x, what are the approximate values of the non-integral roots of the polynomial equation?
Who introduced the theory of divine right of kingship?
The area of triangle ABC is ____ square units.
5) The mean salary of 5 employees is $40300. The median is $38500. The lowest paid employee's salary is $32000. If the lowest paid employee gets a $3100 raise,
What is the answer to this question
HELP in the image above please!