The code executes properly but I do not get the logic.

I am struggling with the "students list":

As required, I have created the list, it does however look like it's ultimately a concatenation of the three dictionaries that have been defined previously. A print(students)-command seems to prove this point:

{'homework': [90.0, 97.0, 75.0, 92.0], 'name': 'Lloyd', 'quizzes': [88.0, 40.0, 94.0], 'tests': [75.0, 90.0]}

{'homework': [100.0, 92.0, 98.0, 100.0], 'name': 'Alice', 'quizzes': [82.0, 83.0, 91.0], 'tests': [89.0, 97.0]}

{'homework': [0.0, 87.0, 75.0, 22.0], 'name': 'Tyler', 'quizzes': [0.0, 75.0, 78.0], 'tests': [100.0, 100.0]}

If I now print(i) in...

*def get*class_average(students):_

_ results = []_

_ for i in students:_

_ print(i)_

_ results.append(get_average(i))_

_ print(results)_

_ return average(results)_

...I do also get the values *{'homework': [90.0, 97.0, 75.0, 92.0], 'name': 'Lloyd', 'quizzes': [88.0, 40.0, 94.0], 'tests': [75.0, 90.0]}* for the first iteration.

And here is my point: I would have expected to have the value "lloyd" passed to the function get_average in the first run since get_average requires the dict name "lloyd" in order to work.

Instead, it seems to pass on all key-value combinations though in my understanding.

What am I getting wrong here?

I appreciate your input everybody, many thanks in advance!

```
lloyd = {
"name": "Lloyd",
"homework": [90.0, 97.0, 75.0, 92.0],
"quizzes": [88.0, 40.0, 94.0],
"tests": [75.0, 90.0]
}
alice = {
"name": "Alice",
"homework": [100.0, 92.0, 98.0, 100.0],
"quizzes": [82.0, 83.0, 91.0],
"tests": [89.0, 97.0]
}
tyler = {
"name": "Tyler",
"homework": [0.0, 87.0, 75.0, 22.0],
"quizzes": [0.0, 75.0, 78.0],
"tests": [100.0, 100.0]
}
totalavg=0
def get_letter_grade(score):
if score>=90:
return "A"
elif score>=80:
return "B"
elif score>=70:
return "C"
elif score>=60:
return "D"
else:
return "F"
def average(numbers):
total=float(sum(numbers))
total=total/len(numbers)
return total
def get_average(student):
homework=average(student["homework"])
quizzes=average(student["quizzes"])
tests=average(student["tests"])
totalavg=homework*0.1+quizzes*0.3+tests*0.6
return totalavg
students = [lloyd, alice, tyler]
def get_class_average(students):
results = []
for i in students:
print(i)
results.append(get_average(i))
print(results)
return average(results)
print(len(students))
get_class_average(students)
```