# I don't understand what exactly I am doing wrong

#1

``````Hi,
I am trying to get this code to work for the lesson I am doing, but I keep getting the error "get_average(alice) raised the following error: global name 'student' is not defined". Anyone have any suggestions as to what I am doing wrong?
Thanks (my code is below)

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]
}
students = [lloyd, alice, tyler]
def average(numbers):
total = sum(numbers)
total = float(total)
avg = total/len(numbers)
return avg
def get_average(students):
homework = average(student['homework'])
quizzes = average(student['quizzes'])
tests = average(student['tests'])
complete = homework * .1 + quizzes * .3 + tests * .6
return complete

**Nevermind. I figured it out (spelling error), but I don't know how to close this post, so yeah.**``````

#2