I don’t understand the reasoning behind why the code on lines 51 and 53 is there.
students = [lloyd, alice, tyler]
This list is more for convenience and organization than anything else. Rather that have to refer to each dictionary separately, we can refer to the list and all the references are there, in one place. We can iterate over this list as many times as we need and never miss or leave out a student.
The function expects this list of object references, and is able to compute the average for every student in the list.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.