A little bit stuck please help


#1

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

#2

homework, quizzes and tests variable all contain the average homework grade, that can't be right


#3

what do I change then?


#4

well, the quizzes variable should contain the average quiz grade, so look at the line where you define quizzes:

quizzes = average(student['homework'])

its clearly visible that average() calculates the average students homework grade (for quizzes variable, which should contain the average quiz grade :thinking:)


#5

I'm sorry that was a very stupid mistake. have finally realised now


#6

A little bit, yes

that is why i hoped that my original reply would be enough to push you in the right direction


#7

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