9/9 Question about variables


#1

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?


#2

Hi @papasven,

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


#3

Sorry, just edited the initial post


#4

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


#5

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.


#6

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.


#7

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