Header Ads

Python - WAP to Print Largest of the 3 Numbers Python - 02

This is a Python Source Code to print the Greatest of the 3- Numbers.

Code:

#!/usr/bin/python3

while True:

    Num1 = int(input("Enter a Value of Num1 : "))
    Num2 = int(input("Enter a Value of Num2 : "))
    Num3 = int(input("Enter a Value of Num3 : "))

    if (Num1 > Num2 > Num3):
               print ("The Largest Number is Num1 : '%d'" % (Num1) )
    elif (Num2 > Num1 > Num3):
               print ("The largest Number is Num2 : '%d'" % (Num2) )
    else:
               print ("The largest Number is Num3 : '%d'" % (Num3) )


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

Program Output: 



...

No comments