Simple Python Scripts
Scripts for simple Python programs
Sunday, 1 January 2017
To check the number is odd or even.
#To check the number is odd or even.
#to accept the number from user
n=int(input("enter number:"))
#check the number is odd or even using if-else
if (n%2==0):
print(n,"is even number")
else:
print(n,"is odd number")
OUTPUT:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment