# 9/9 Can't get it right

#1
``````    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]
}

def average(numbers):
total = sum(numbers)
total = float(total)

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

return homework + quizzes + tests

if score >= 90:
return "A"
elif score >= 80:
return "B"
elif score >= 70:
return "C"
elif score >= 60:
return "D"
else:
return "F"

def get_class_average(students):
results=[]
for student in students:
get_average(student)
results.append(get_average(student))
return average(results)

class_list = [lloyd, alice, tyler]

print get_class_average(class_list)

I just can't get it to work, i scrolled through all topics made for this exercise and nothing seems to work. I just wanna get on with it but a command that should be fairly simple like printing is dragging me down. I just got into programming, cheers to you all.

Error: One of the following is missing or broken when we tried to use it: alice, lloyd, tyler, students, get_class_average, get_letter_grade

#2

It gives you a list of things to check:
alice, lloyd, tyler, students, get_class_average, get_letter_grade
So check them, one of them isn't there.
Just looking for their definitions should tell you which is missing, but you can also try printing them, it'll let you know if something isn't there.

#3

Thanks for the input.
i changed the list from class_list to students and modified print like this:

``````students = [lloyd, alice, tyler]

print get_class_average(students)  #prints the  average score

print get_letter_grade(get_class_average(students)) # printed the entire score off the class``````

And it works!