What am I doing wrong?


#1



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

It doesnt return the correct value,


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

def grades_sum(scores):
    computes = sum(scores)
    return computes
    
def grades_average(grades):
    grds = 0
    for i in grades:
        grds += 1
    grades = grades_sum(grades)
    total = grades / grds
    return total
print grades_average(grades)


OUTPUT : 80.4230769231
None

ERROR : Oops, try again. grades_average([6, 9, 9, 3, 9, 5]) returned 6 instead of the expected: 6.833333333333333


#2

oh nvm i figured it out
It wasnt float :smiley:


#3

Nice job figuring it out yourself!


#4

Thanks man, appreciate it


#5

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