9/9 Question about variables


The correct answer is:

students = [lloyd, alice, tyler]
class_avg = get_class_average(students)
print class_avg
print get_letter_grade(class_avg)

However, if I change both variables ‘students’ to ‘class_list’, which was what I was trying to do initially, it does not work. Any reasons why?


Hi @papasven,

What does it not do if you change the names of the variables?


Sorry, just edited the initial post


Was there an error message? If so, what did it say?


Yes, there was. It shows “One of the following is missing or broken when we tried to use it: alice, lloyd, tyler, students, get_class_average, get_letter_grade”

I know we’re supposed to use ‘students’ per instructions, I am just curious about how changing it affects the outcome.


As far as the Python interpreter was concerned, you did not make an error. The message was from Codecademy, and it was issued only because the submission correctness test (SCT) for this exercise is very particular about what names you use for certain variables.


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