Please help me find the error


What is wrong with the following code? The error message says:
Oops, try again. It looks like your grades_sum function doesn't properly compute the sum of all the grades! It returned None instead of 170 for grades_sum([2, 66, 45, 57])
While on the console window it says:

How do i fix this?

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

def grades_sum(scores):
    for b in scores:
    print total


Make sure you return total at the end of function.


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