Global name llyod is not defined error ..please help


#1



llyod = {
'name':"llyod" ,
'homework': [],
'quizzes':[] ,
'tests':[],
}
alice = {
'name':'alice',
'homework': [],
'quizzes': [],
'tests':[],
}
tyler = {
'name':'tyler',
'homework':[] ,
'quizzes':[],
'tests':[],
}
Oops, try again. Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error.

WHat is the wrong in my code?? please help me .

Replace this line with your code.


#2

I would love it if you post your code, well formatted.

Thank you!


#3

Thank you .I have provided the code .Could you please trace that out ?


#4

Sorry, I don't see it. Copy and paste it. A URL doesn't suffice. It will only like to my already done exercise.

Thank you!


#5

I have followed your instruction.Is the code visible now ? thank you


#6

Yes it is. Thank you.

The issue should be that extra comma on the last key and value in each dictionary. The dictionary might assume that more is to be added. Remove it. See below:

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

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

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

Thank you!


#7

Thank you !! I got it done . I have actually used''llyod ' instead of 'lloyd'..:sweat_smile::joy:
Thanks once again !!


#8

You're welcome.

Have fun coding! :smile:


#9

Things happen :smiley: We always forget a thing or two which drive us crazy