Lesson 1: Help


#1


https://www.codecademy.com/courses/python-beginner-en-qzsCL/0/1?curriculum_id=4f89dab3d788890003000096

I am so confused as to why this doesn't work, it gives the error: "Oops, try again. Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error"

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


#2

Hi, @objectmaster78910 ,

You have ...

llyod = {

Be careful with the spelling of names of variables. The instructions state ...

Create three dictionaries: lloyd, alice, and tyler.

Also check this ...

"name":"llyod",

Note that ...

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


#3

You spelled Lloyd wrong...


#4

Why are the names not in brackets? I thought since they are part of a list you would want [].


#5

Hello, can someone help please?

My Code
Lloyd = {
"name": ["Lloyd"],
"homework": [],
"quizzes": [],
"tests": []
}
Alice = {
"name": ["Alice"],
"homework": [],
"quizzes": [],
"tests": []
}
Tyler = {
"name": ["Tyler"],
"homework": [],
"quizzes": [],
"tests": []
}

Error Message
Oops, try again. The name key does not have the value "Lloyd" in your lloyd dictionary.


#6

i spelled dictionary names lower case and i took off brackets from around the value. your code is correct otherwise


#7

Take off the brackets on each of the names. You should be good after that if your indents are correct.


#8

Thanks for your help, it is working now.


#9

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