Lesson Number One


#1



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


I typed the code seen below, and I got the following error messages. Can someone help please?:confused:
File "python", line 3
"homework": []
^
SyntaxError: invalid syntax

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


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


#2

Look at the code in the instructions. You need some sort of way to separate items in your dictionary.


#3

Thank you.:slight_smile:


#4

My code's still getting the same error ... Any idea?


#5

@csswhiz37992 Please post your code so we can see what's wrong.


#6

You might need to add commas, which is what I forgot.


#7

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

That's the code and the error is:
Oops, try again. The name key does not have the value "Lloyd" in your lloyd dictionary.


#8

Oh no... this is going to be embarrassing for me... I just typed Llyod instead of Lloyd ...
:stuck_out_tongue_closed_eyes:


#9

It's okay, nobody's perfect.


#10

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