Write a Python programme to create a list and find which number is maximum and minimum?
Answers
Answered by
0
Answer:
def max_min(data):
l = data[0]
s = data[0]
for num in data:
if num> l:
l = num
elif num< s:
s = num
return l, s
print(max_min([0, 10, 15, 40, -5, 42, 17, 28, 75]))
Similar questions
English,
1 month ago
Accountancy,
3 months ago
CBSE BOARD X,
3 months ago
History,
9 months ago
Chemistry,
9 months ago