Just weight and see problem not yet on forum!


Can anyone please help? I haven't seen this issue pop up on this forum and I don't know what the problem is...

ERROR: Oops, try again. get_average(alice) raised the following error: global name 'average' is not defined

# Add your function below!
def get_average(student):
    homework = average(student["homework"])
    quizzes = average(student["quizzes"])
    tests = average(student["tests"])
    return 0.1*homework + 0.3*quizzes + 0.6*tests


can you post your full code? You need the average function you build in it is okay to be average

It should be there by default. If it not, copy it from the other exercise, if the average function doesn't exist, you get the error message you just had


Oh man of course. Thanks!!
The programme had deleted it somehow. I'll put it back in.


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