0 votes
271 views
in Python by (98.9k points)
edited
Python Program to Find the Largest Among Three Numbers

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
num3 = float(input("Enter third number: "))

if (num1 >= num2) and (num1 >= num3):
   largest = num1
elif (num2 >= num1) and (num2 >= num3):
   largest = num2
else:
   largest = num3

print("The largest number is", largest)

 

Related questions

0 votes
1 answer 132 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
0 votes
1 answer 719 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
0 votes
1 answer 115 views
0 votes
1 answer 436 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

538 users

...