1. Home
  2. Python
  3. Python Examples
  4. Python – Check Even Odd Number

Python – Check Even Odd Number

Python Program to Check if a Number is Even or Odd

Q. Write a Python program to to check if a given number is a even number or odd number.

What is even and odd number? If a number is divided by 2 and remainder is 0, then the given number is even number, else the number is a odd number.

Even numbers are – 2, 4, 6, 8, 10 …
Odd numbers are – 1, 3, 5, 7, 9 …


An example to check if given number is even number of odd number in Python.

Execute above program, input a number see the result:

Enter a number: 7
7 is Odd number

Again execute and input other number.

Enter a number: 6
6 is Even number
Was this article helpful to you? Yes No