Lesson Number One



I'm trying to set the name key in the "lloyd" dictionary to be "Lloyd", however, I get an error message saying
"Oops, try again. The name key does not have the value "Lloyd" in your lloyd dictionary." I don't understand why this is happening, because it looks correct to me.

The name key is supposed to be set to "Lloyd"

lloyd = {
    "name": ["Lloyd"],
    "homework": [], 
    "quizzes": [],
    "tests": [],

alice = {
    "name": ["Alice"],
    "homework": [], 
    "quizzes": [],
    "tests": [],    

tyler = {
    "name": ["Tyler"],
    "homework": [], 
    "quizzes": [],
    "tests": [],    


you need to remove the []'s


oh, thanks. The others should be empty lists?


indeed they should. :slight_smile:


I am getting the following error:
Oops, try again. Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error.
Help needed.



I have tried removing the empty square brackets but something seems to be wrong since it is indicating us to provide the keys of the dictionary.
For example:

llyod={"name": ["Lloyd"],}
alice={"name": ["Alice"],}
tyler={"name": ["Tyler"],"homework":[],"quizzes":[],"tests":[],}

Oops, try again. Did you give alice the homework key?


Look closely at the error, and your code...


Thank you, made changes and its working now.


Try removing the brackets from the name keys. :wink:


im having the same issue, i removed the brackets but get the same error


check for spelling mistakes... the error persisted for me due it :sweat_smile:


Remove the brackets for the name key but leave the brackets for the rest of the keys. (If all else fails check over you syntax for any small mistake):relieved:


I'm pretty sure this question is not functional, the only way to pass the level is to remove brackets around the 'Lloyd' assigned to the name key (why?) and have empty brackets for the empty lists.


here's the correct answer

lloyd = {"name":"Lloyd", "homework":[], "quizzes":[], "tests":[]}
alice = {"name":"Alice", "homework":[], "quizzes":[], "tests":[]}
tyler = {"name":"Tyler", "homework":[], "quizzes":[], "tests":[]}


thanks man! this took me so long to do...:grin:


im having the same error and i don't understand why