6. Just wait and see


#1



6. Just Wait and See


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


Replace this line with your code. 


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

def get_average(student):
    homework=average(student['homework'])
    quizes=average(student['quizes'])
    tests=average(student['tests'])
    grade= (.1 * homework) + (.3 * quizes) + (.6*tests)
    return grade


#2

I'm on step 6 but it is giving me a error on code from step 5, which it passed in the last lesson.


#3

this is not right:

total/len(numbers)=total

how would that work? And return total doesn't seem to be indented correctly


#4

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

def get_average(student):
homework = average(student["homework"])
quizes = average(student["quizes"])
tests = average(student["tests"])
result = (homework * .1) + (quizes * .3) + (tests * .6)
return result

get_average(alice) raised the following error: 'quizes'


#5

you mispelled quizzes


#6

Ok. Thanks for your help


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.