Frustrated with Part of the Whole


#1


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


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


I've been working on this all day and I can't see what's wrong.


def get_class_average(students):
    students = [lloyd, alice, tyler]
    results = []
    for item in students:
        results.append(get_average(students))
    return average(results)


#2

This list should be up with the other data, just below the dictionaries.


#4

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