• Register
100 points
4

Overview 

In this kodlogs article today we will analyze to write a Python Program to Check if a Number is Even or Odd.

Even or odd method 

First we ask the consumer to enter a range and we save that in a variable.Then we divide that wide variety through two and we test for the the rest value.if the the rest is zero then it skill that the wide variety is even, else the quantity is odd, 

To recognize this example, you need to have the understanding of the following Python programming .We are creating this little program in kodlogs. Those who are just learning programming.

x=int(input("enter a no"))
If x%2 = =0:
  Print(x,"is Even")
else:
  Print(x,"is Odd")

OUTPUT .1

Enter a number:43
43 is odd

OUTPUT .2

Enter a number:18
18 is Even

I hope you will understand even or odd program in python 

 

100 points
4