0 votes
283 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 143 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
0 votes
1 answer 735 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
0 votes
1 answer 125 views
0 votes
1 answer 443 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

561 users

...