Lesson Number One - Cannot Find the Error


#1

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

I keep getting this error message:
Oops, try again. Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error.

Here is my code:

llyod = {
    "name": "Llyod",
    "homework": [],
    "quizzes": [],
    "tests": []
}

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

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

Please help me find whats wrong with my code...


#2

misspelling there.

lloyd


#3

omg hahaha thankyouu!


#4

I am getting the same exact error but I spelled lloyd right.


#5

i wrote the below code and it worked well.

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

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

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


#6

Make sure that you are not using the [ and ] around "Lloyd"

in other words the first one should look like this:
lloyd = {
"name": "Lloyd",
"homework": [],
"quizzes": [],
"tests": [],
}


#7

Please help locate my error. My code looks like:
lloyd = {"name" : "Lloyd" , "homework" : [] , "quizzes" : [] , " tests": []}
alice = {"name" : "Alice" , "homework": [], "quizzes": [], " tests": []}
tyler = {"name" : "Tyler" , "homework": [], "quizzes": [] , " tests": []}

Error message: Oops, try again. Did you give lloyd the tests key?


#8

Can you see the space while you put key tests ?
You have to fix this space from each of the tests keys.


#9

Thanks, that worked.


#10

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