Python Program to input any number and check whether it is odd or even
n=int(input('enter any number'))
if n<0:
print(n,':number is negative')
else:
if n%2==0:
print(n,':number is even')
else:
print(n,':number is odd')
n=int(input('enter any number'))
if n<0:
print(n,':number is negative')
else:
if n%2==0:
print(n,':number is even')
else:
print(n,':number is odd')
Comments
Post a Comment