students = [lloyd, alice, tyler]

def average(numbers):

total = sum(numbers)

return float(total)/len(numbers)

def get_average(student):

return .1 * average(student["homework"]) + \

.3 * average(student["quizzes"]) + \

.6 * average(student["tests"])

print get_average(student)

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"

print get_letter_grade(get_average(lloyd))

its returning

Traceback (most recent call last):

File "python", line 28, in

File "python", line 26, in get_average

TypeError: list indices must be integers, not str