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
2020-10-16T13:12:28-0400
numbers = [] #empty list to store numbers
for _ in range(3):
num = int(input("Enter a number:")) #user input
numbers.append(num) #append list with current number
print("Largest: ", max(numbers)) #print the largest number
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment