So I've done this, and checked it like 90 times against other's codes, and an error saying that my program isn't calculating the sum of everything, and it keeps returning "None". Help?

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

def grades_sum(scores):

total = 0

for g in scores: #to get every individual grade

total += g

print total

grades_sum(grades)

"""Error: 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 381 for grades_sum([73, 28, 85, 3, 32, 82, 42, 36])"""