Just weight and see


#1

Any idea where I'm going wrong with this?

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


#2

I guess, it will be simplier
def get_average(student):

return average(student["homework"])*0.1 + \
average(student["tests"])*0.6 + \
average(student["quizzes"])*0.3

Maybe there is need to use continuation character, that's why ur code doesn't compilate


#3

The variables already add up; and, not being a list, sum() is not applicable.


#4

@rblo10 Here's the code I just got to work for you to use as a comparison.

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