Python Unit 6 Exercise 1. Lesson Number One


After creating the dictionaries and its keys, the instruction is telling to

Have the "name" key be the name of the student (that is, lloyd's name should be "Lloyd") and the other keys should be an empty list. (We'll fill in these lists soon!)

But here is what I got

Any idea what I did wrong? Thanks.


Hi @cakthe ,

Yes, it says ...

... lloyd's name should be "Lloyd" ...

... but you have "name": ["Lloyd"]

There is a difference.


So should it be "name": "Lloyd" ?


Give it a try. Let us know what happens.


Nice! It works!

But why the name key won't accept the "[]" parentheses? Is it because of the unallowed syntax or simply because of the concept that "nobody has multiple names"?


The syntax is allowable. It is rather, as you suggest, because everyone in this class has only one name. The message you saw was the result of Codecademy's submission correctness test (SCT), which is designed to check your code. The criteria include the requirement that the code conform to the instructions given in the exercise.

Since each student will have only one name, the decision was made that the value associated with the "name" key will not be put into a list. The other keys will refer to lists, because there will be more than one "homework", "quizzes", and "tests" grade for each student.


I get it. Thanks a lot!


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