Post Page Advertisement [Top]

python program

Write a program in python to check given number is odd or even ?

Home /python language #Write a program in python to check given number is odd or even ?
Write a program in python to check given number is odd or even ?
in python-language

  Write a program in python to check given number is odd or even ?
Algorithm of program:-
step 1 − START
step 2 − let a integers value x 
step 3 − use the if and else loop/statement
step 4 − again check (if x%2==o:) 
step 5 − for true condition print a even number
step 6 − for false condition print a odd number
step 7 − STOP



Code:-
x=int(input("enter a number"))
if x%2==o:
     print ("even")
else:
       print ("odd")



Dizit Operators
Thank-you

Tage:-python language

No comments:

Post a Comment

Bottom Ad [Post Page]