Here's my code:

# Add your function below!

def average(numbers):

total = 0.0

total += sum(numbers) #add the number in numbers all together from the first one to the last one

total /= len(numbers) #divide the sum of the numbers by the length of the "numbers" list

print total

return total

def get_average(student):

score = 0

for person in student:

score = 0.1 * average(student["homework"]) + 0.3 * average(student["quizzes"]) + 0.6 * average(student["tests"])

print score

return score

get_average(guys)

guys = [lloyd, alice, tyler]

Traceback (most recent call last):

File "python", line 34, in

File "python", line 31, in get_average

TypeError: list indices must be integers, not str

why can't I use the "for loop" to print out all of the three student's grades?

I can print their grade individually but at the bottom, the "guys" list, it seems to be useless

and what dose "list indices must be integers, not str" means?

how can I fix it?

Thanks a lot for your help!

`Replace this line with your code.`