8. Part of the Whole


8. Part of the Whole

These are the error messages

Traceback (most recent call last):
File "python", line 57, in
File "python", line 52, in get_class_average
NameError: global name 'get_' is not defined

It should be getting the class average and not have error messages about variables not being defined

students = [lloyd, alice, tyler]
def get_class_average(students):
    results = []
    for each in students:
    return average(results)

print get_class_average(students)


You spaced this out. Other than that i think it looks fine! I'm pretty sure this is the reason for the get_ error.


Thanks you were right! :smile:


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