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 many oxygen atoms are in 3.00 grams of sodium dichromate, Na2Cr2O7?
Infiltration is the process by which rain water becomes
how to say December 25 in French
list six external parts or peripherals of a computer system and identify which are output and which are input devices
What piece of legislation allowed Great Britain to borrow military equipment from the U.S. With the assurance that it would be returned after the war?
The earliest cities of the Indus River Valley civilization were designed in a grid. in a circular pattern. with protective walls. with no plan.
Where are seeds produced in a plant
Consider the system of inequalities and its graph. y ≤ –0.75x y ≤ 3x – 2 In which section of the graph does the actual solution to the system lie? 1 2 3 4
The study and manipulation of DNA on a molecular level is known as Select one: a. evolution. b. genomes. c. biochemistry. d. molecular genetics.
Given that MNOP is a rectangle, find x and y. A. x = 100, y= 81 B. x = 50, y = 27 C. x = 55, y = 27 D. not enough information