Answer to Question #235147 in Python for Isabel Cortez

Question #235147

The first line will contain a message prompt to input the first number.

The second line will contain a message prompt to input the second number.

The third line will contain a message prompt to input the third number.

The last line will contain the largest among the three numbers.


Enter·the·first·number:·1

Enter·the·second·number:·2

Enter·the·third·number:·3

The·largest·number·is·3


1
Expert's answer
2021-09-09T17:12:21-0400
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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS