Part of The Whole


not exactly sure where I went wrong or what the program wants me to do. Any suggestions?

aclass = [lloyd, alice, tyler]

def get_aclass_average(students):
    results = []
    for students in aclass:
    results = get_average(students)
    return average(results)

File "python", line 54
results = get_average(students)
IndentationError: expected an indented block


The error message already gives you a hint that the problem lies somewhere in the way the code is indented, that is, where in the line you start your code. Think about exactly what part of the code needs to be inside your loop eg. do the results need to be inside or outside the for loop?


Got it! Figured it out.


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