I don't really understand why if you're defining

```
homework = average(student["homework"])
quizzes = average(student["quizzes"]
tests = average(student["tests"])
```

that you have to retype all of that after return to multiply by their weights?

Shouldn't you be able to type it as

`return 0.1 * homework + \ `

0.3 * quizzes + \

0.6 * tests

? Otherwise, why did you bother setting those values equal to those variables in the first place?

I ended up typing it like you did above as I've formatted below, I'd just like to understand why it doesn't work the way I've written above:

```
def get_average(student):
homework = average(student["homework"])
quizzes = average(student["quizzes"])
tests = average(student["tests"])
return 0.1 * average(student["homework"]) + \
0.3 * average(student["quizzes"]) + \
0.6 * average(student["tests"])
```

EDIT:

I messed with it some more and realized that in order for it to pull from those values I need a for loop. This code also worked for me:

```
def get_average(student):
homework = average(student["homework"])
quizzes = average(student["quizzes"])
tests = average(student["tests"])
for avg in student:
return 0.1 * homework + \
0.3 * quizzes + \
0.6 * tests
```