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
# 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])
Comments
Leave a comment