Skip to content

Commit 78745c2

Browse files
Create Largest of the three numbers.py
1 parent 016128c commit 78745c2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Largest of the three numbers.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Largest number from the given three numbers
2+
3+
4+
# Take the input from the user
5+
num1 = float(input("Enter the first number - "))
6+
num2 = float(input("Enter the second number - "))
7+
num3 = float(input("Enter the third number - "))
8+
9+
if(num1 >= num2) and (num1 >= num3):
10+
largest = num1
11+
elif(num2 >= num3) and (num2 >= num1):
12+
largest = num2
13+
else:
14+
largest = num3
15+
16+
print("The largest number is", largest)

0 commit comments

Comments
 (0)