# 5. idk whats going wrong been stuck for a while

#1

Ive had this code in there and idk whats wrong with it.

this is what i get:

File "python", line 22
SyntaxError: can't assign to function call

``````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):
sum(numbers) = total
float(total) =total
total/ len(numbers)

#2

here:

``sum(numbers) = total``

on the left side of the equal sign, is the variable in which you store the information/data on the right side is what you store in that variable, so if you want to store something in total you do:

``total = 5``

#3

I do this:

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

and I get:

script.py

File "python", line 25
SyntaxError: 'return' outside function

#4

nvm i got it. the return had to be tabbed over

#5

good you solved it.

Yep, i saw return was wrongly indented, but i was confident you would be able to figure it out

#6