Student Becomes the teacher


#1


https://www.codecademy.com/courses/python-beginner-en-qzsCL/1/4?curriculum_id=4f89dab3d788890003000096

Oops, try again. get_class_average([alice]) resulted in an error: 'builtin_function_or_method' object has no attribute 'getitem'


It isn't working what do i do halp!


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


#3

This line is not doing anything. It may be removed.

Change the square brackets to parentheses.

This should be inside the function block so it is reset each call.


#4

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