Error in get_class_average


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:
        return average(results)


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.


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

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


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