Part of The Whole


#1


https://www.codecademy.com/en/courses/python-beginner-en-qzsCL/1/4?curriculum_id=4f89dab3d788890003000096


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)
    results.append(students)
    return average(results)

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


#2

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?


#3

Got it! Figured it out.


#4

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