A little bit stuck please help


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


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


what do I change then?


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:)


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


A little bit, yes

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


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