Help with this


i write this code 

[# Add your function below!
def average(numbers):
    total = sum(numbers)
    total = float(total) / len(numbers)
    return total
    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]
bu i keep getting error as "Oops, try again. get_average(alice) raised the following error: global name 'avarage' is not defined"

so whats wrong?


You have a typo. Type 'average' instead of 'avarage'


at first I also though the same thing but after I check many times there aren't any typo on my code that mixing average with avarage


Oops, I didn't see one thing : Your function get_average is inside function average. Fix the indentations :slight_smile:
(Sorry for a late post again)


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