I did 3 Python questions for 3 days. I wonder how to solve it.

Asked 2 years ago, Updated 2 years ago, 15 views

python

2022-09-20 18:08

2 Answers

Isn't this enough?

n = int(input())
li = []

for i in range(0, n):
    point = int(input())
    li.append(point)

max_li = max(li)
min_li = min(li)
total_score = -(max_li + min_li)

for x in range(0, n):
    total_score += li[x]

print(li)
print("Max: " + str(max_li) + ", Min: " + str(min_li))
print("Total score: " + str(total_score))


2022-09-20 18:08


2022-09-20 18:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.