Answer to Question #284884 in Python for Trynn

Question #284884

Write a program that takes three numbers as input from the user, and prints the largest.

Sample Run

Enter a number: 20 
Enter a number: 50 
Enter a number: 5 

Largest: 50

Hint: Remember that the numbers should be compared numerically. Any input from the user must be transformed into an integer, but printed as a string.




1
Expert's answer
2022-01-05T01:40:30-0500
numbers = []
for _ in range(3):
    num = int(input("Enter a number:"))
    numbers.append(num)
print("Largest: ", max(numbers))


Enter a number: 20 
Enter a number: 50 
Enter a number: 5 

Largest: 50

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
New on Blog
APPROVED BY CLIENTS