Created
May 27, 2017 05:36
-
-
Save hi-manshu/8c422124b2cab58fe72a6db75723faa2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python Program to find Largest of Three Numbers using Elif Statement | |
#declaration of 3 numbers | |
#float(input("Please Enter the First value: ")) means value can be in float and it is taking input like scanf in c | |
num1 = float(input("Please Enter the First value: ")) | |
num2 = float(input("Please Enter the First value: ")) | |
num3 = float(input("Please Enter the First value: ")) | |
if (num1 >= num2) and (num1 >= num3): | |
largest = num1 | |
elif (num2 >= num1) and (num2 >= num3): | |
largest = num2 | |
else: | |
largest = num3 | |
print("The largest number between",num1,",",num2,"and",num3,"is",largest) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment