Question-   write a program that takes three numbers as input and prints the largest.


Question:- 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.


Complete solution below:-

number=[] # Empty list to Store numbers  or initialize empty list.

for _ in range(3):

            num=int(input(“Enter the any number:= ”))  #User give the input

            number.append(num) #append the list with current number .

print(“The Largest Value:= “ max(number)) # show the final output of the value

Our happy customers

They are fast in responding to homework questions. they have the best technical writers. Thanks for helping me with my programming doubts.

5  stars image

I contact to disklib for homework, they help me out, despite there was some technical issue they gone through extra mile for me and provide me good quality work in first priority. 100% recommended.

studying on laptopAsif Waheed
5  stars image

Desklib's study resources are best & unique. Their study database is easy to access and easy to use.
100 % recommended.

library and studentsMike Taylor
5  stars image