8/9 Error Message


#1

def get_class_average(students):
results = []
for student in students:
result.append(get_average(student))
return average(results)

ERROR MESSAGE:
Oops, try again. get_class_average([alice]) resulted in an error: global name 'result' is not defined.
What's the problem??


#2

You've got a typo.
You created a list called 'results', but you're appending 'result'.


8/9 average undefined
#3

Seeing this helped me. I'd incorrectly created "results = 0" rather than an empty list "results = []"


#4

def get_class_average(students):
results = []
for student in students:
results.append(get_average(student))
return average(results)

Thank you very much for your assistance!!