Lesson 1


#1

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

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

That's my code and its telling me that this ( : ) is an invalid syntax. Not sure what to do.


#2

It's telling you that's when it stops making sense. Your mistake may be higher up. My suggestion is to remove code until you have a minimal piece of code that has the syntax error in it, and then compare to some example of what it's supposed to look like.


#3

I got it working. thanks.


#4

Hi could you please provide the changes that were made to remove the error that you got in the code as I am facing a similar problem


#5

Are you also on exercise 1?

Please show us your Traceback error and also post your code.

How to post code in this forum.


#6

llyod = {
'name' : ['Llyod'],
'homework' : [],
'quizzes' : [],
'tests' : []
}
alice = {
'name' : ['Alice'],
'homework' : [],
'quizzes' : [],
'tests' : []
}
tyler = { 'name' : ['Tyler'],
'homework' : [],
'quizzes' : [],
'tests' : []
}
This is my code it provides the following error

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


#7

Proper indendation was provided


#8

I got the reason why I got the error message. It is a rather stupid mistake I had typed llyod instead lloyd. My code ran fine


#9

Wow I spent an hour sourcing through these forums and I, too, has misspelled LLoyd. Thank you sreekanth for this I may never have passed this lesson.