Lesson Number One


#1



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


File "python", line 3
"homework": [],
^
SyntaxError: invalid syntax


I am getting this error message. I have been stuck with this syntax error for 25 minutes and I can't figure it out.


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


#2

Missing comma after this and the other first properties, below.

Note that the pointer is where parsing stops. That means the error is either right there, or just before that point.


#3

God, thanks! Stupid mistake, but I did not know it was actually required. Thanks, and lesson learned!


#4

By the way, the point is not on the "h" in homework on the console log, it's right below the colon


#5

which is where parsing stopped. The error is in the unexpected identifier, which did not get parsed but threw the error.


#6

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