Error in get_class_average


#1

i think this code is corrected, but occur the error message of "make sure you have define"
i don't understand this error in detail.

def get_class_average(students):
        results = []
        for student in students:
            results.append(get_average(student))
        return average(results)

#2

Same code here with the error "Oops, try again. get_class_average([alice, lloyd]) returned 91.15 instead of 85.85 as expected". No idea what's wrong. And I think the instructions could use some refinement, as they reference a "class" list and also tell us to expect three students.


#3

"class" is reserved word... i could not use for variable...
class = [lloyd,alice,tyler]

this one is syntax error.
Me too, no idea.


#4

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