Lesson Number One ( 'lloyd' is not defined" )


#1


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

Did you create a dictionary named lloyd? Your code threw a "global name 'lloyd' is not defined" error.

I expect a result to be a dictionary (which I have created!)

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


#2

You're missing colons : after "quizzes" and "tests" for all students. You have them after "homework" which is correct.


#3

Thanks! That really helped!


#4

please help

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

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

fixed

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

#5

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