Computing the error


#1



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


None

Save & Submit Code
Reset Code
Oops, try again. You did not print the correct average. Double-check your code and make sure you print the average!


I can't find what is wrong with this code.


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

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

def grades_average(grades):
    sum_grades = grades_sum(grades)
    average = sum_grades / float(len(grades))
    print average
    return average


#2

I answered my own question. I didnt call the function what is why


#3

def grades_average(grades):
sum_grades = grades_sum(grades)
result = sum_grades / float(len(grades))
return result

print grades_average(grades)

Because need return Result and Print return of Function


#4