Write a program even or odd numbers in python language code

 Write a program even or odd numbers in python language code 





Program :

Method 1 :

 num = int(input("Enter your number :"))


if num%2==0:

    print(num,"is even number")

    

else:

 print(num," is oddnumber")


Output :

Enter your number :25

25 is oddnumber




Method 2 :


num = int(input("Enter your number :"))


if num%2==0:

    print("%d is even number"%num)

    

else:

 print("%d is oddnumber"%num)


Output :

Enter your number :25

25 is oddnumber


If you have any doubts pls comment 

Post a Comment

0 Comments