Part of the Whole # 8


Hello everyone. I am stuck with part 8 of student becomes teacher. My code is below and honestly, I was pretty confident about my code. But I got this error message and I am not really sure what to do. Thanks everyone for your help and feedback. If anyone can provide a way to help from making common syntax errors, that will be helpful as well. Thanks a lot!

File “python”, line 34
for student in class:
SyntaxError: invalid syntax


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

<do not remove the three backticks above>


what is class?


That was a bit tricky in the instruction, they asked to refer to class (of students) and not a ‘class’ called variable, so your class (of students) is variable students.