Header Ads

Python - WAP to Print Odd or Even of a Number in Python - 03


This is a Python Source Code to print the Odd or Even of any given Number in Python. 

Source Code:

#!/usr/bin/python3

while True:

    Num = int(input("Enter a Number : "))

    if (Num % 2 == 0):
        print ("The Number '%d' is Even!" % (Num) )
    else:
        print ("The Number '%d' is Odd!" % (Num) )

    print ("Codegig.org")

    if (input("To Continue ['y'/n] : ")) == 'y':
        continue
    else:
        break

Program Output:
















....

No comments