Part of whole


Oops, try again. get_class_average([alice]) resulted in an error: list indices must be integers, not str

My code looks right but I keep getting an error

Replace this line with your code.


My code looks like this:
def get_class_average(students):
for student in students:
return average(results)


We don't want to pass the entire list, only one student dictionary at a time.


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