Answer to Question #335771 in Python for Elle Joy

Question #335771

Elle Joy Vasquez



Preliminary Test 04


Create a Python function that takes a list of n integers and returns the largest number among the n integers.

1
Expert's answer
2022-05-01T19:06:11-0400
def int_max(lst):
    return max(lst)


x = [1, 34, 45, 56, 65, 43, 23, 33]
print(f'in list {x}, max = {int_max(x)}')

OUTPUT:

in list [1, 34, 45, 56, 65, 43, 23, 33], max = 65



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