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')

Comments

Some popular posts

Python Program that computes the net amount of a bank account based a transaction log from console input.