Coders Packet

Even and Odd Numbers in a Mobile Number using Python programming

By Shaik Jilani

To find the Even numbers and Odd numbers in a specific mobile number using the Python programming language.

Even Numbers:

              Even Numbers are the numbers that can be divide into two halves or two equal parts.

                                             (or)

               Even numbers are the number that gives zero(0) as the remainder when it is divided by 2.

Let us consider the number 56, which can be divide into two equal parts as 23,23.

Eg: 0,2,4,6,8,10,......

Odd Numbers:

                Odd Numbers are the number that gives one(1) as the remainder when it is divided by 2.

Eg: 1,3,5,7,9,11,......

 

Let us take a mobile number. The mobile number is 9347690784.
Even numbers in the mobile number are 4,6,0,8,4
Odd numbers in the mobile number are 9,3,7,9,7

Explanation of code:

                 In this program, we take a mobile number as input. We declare "e" as even numbers and "o" as odd numbers. We check every number of the mobile number. When the number is divided by 2, the remainder is zero. Hence it is printed as an even number. Otherwise, it is an odd number.

Download project

Reviews Report

Submitted by Shaik Jilani (Jilani534)

Download packets of source code on Coders Packet