The sum of scores


#1


https://www.codecademy.com/courses/python-intermediate-en-7mgOa/1/1?curriculum_id=4f89dab3d788890003000096#

no clue

Replace this line with your code. 

def grades_sum(scores):
    total=0
    for i in scores:
        total+=i
        return total
grades_sum(scores)

File "python", line 3
    def grades_sum(scores):
      ^
SyntaxError: invalid syntax


#2

please post your full code

a function ends the moment a return keyword is reached, so your function ends in the first run of the loop. To get the correct total, the whole loop needs to finish running


#4

you have to call the function with grades not scores


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.