Answer to Question #225605 in Python for Reclimet

Question #225605

Largest Number in the List


This Program name is Largest Number in the List. Write a Python program to Largest Number in the List, it has two test cases


The below link contains Largest Number in the List question, explanation and test cases


https://docs.google.com/document/d/120K51mYmZkwWPZ-KiP4VWxPG52b8P7tB/edit?usp=sharing&ouid=104486799211107564921&rtpof=true&sd=true


We need exact output when the code was run

1
Expert's answer
2021-08-15T04:05:47-0400
# creating the list
lst = []


n = int(input("Enter the number of elements in the lst: "))
for i in range(n):
    x = int(input("Enter the value: "))
    lst.append(x)
    
# sorting the list
lst = sorted(lst)
# printing the maximum value
print(lst[-1])

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