Code works(definitely) but it doesn't


#1

grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]
def grades_sum(scores):
n = 0
for i in scores:
n += i
else:
print n
grades_sum(grades)

I tried return too.


#3

Unnever mind, its still not working


#4

New code:
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]
def grades_sum(scores):
total = 0
for grade in scores:
total += grade
print total
grades_sum(grades)
16.4 section