The sum of scores


So, i return the value of total and it gives me an error saing to print the value, and when i change return to print, there's an error saing to return the value.
please help me

i need to sum all values on grades

grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5]

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



to print what is returned print needs to be called on the function call:

print grade_sum(grades)


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