I need help 8/9 ASAP


#1

Here is my code:

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

And here is the error message:

File "python", line 2
results = []
^
IndentationError: expected an indented block


#2

Hi, @matthewsutton ,

Python code within a code block, such as a function or a for loop, must always be indented with respect to the block header. Accordingly, your code needs to be indented as follows ...

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