8. Part of the Whole


#1



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:
        get_
        average(each)
        results.append(get_average(each))
    return average(results)

print get_class_average(students)


#2

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


#3

Thanks you were right! :smile:


#4

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