L'élève devient le professeur 1.Leçon numéro un


#1



https://www.codecademy.com/fr/courses/python-beginner-fr-FR-wdjot/0/1?curriculum_id=5370f030fed2a866a2000001

Parlons des bug sur les exercices Python...

lloyd = {
    "noms":['Lloyd']
    "devoirs":[]
    "quiz":[]
    "tests":[]
    }
alice = {
    "noms":[]
    "devoirs":[]
    "quiz":[]
    "tests":[]
    }
tyler = {
    "noms":[]
    "devoirs":[]
    "quiz":[]
    "tests":[]
    }

 File "python", line 3
"devoirs":[]
        ^

SyntaxError: invalid syntax


#2

Remplacer les colons a été remplacé par un signe égal, ou =, et tout sera ok


#3

File "python", line 2
"noms"=['Lloyd']
^
SyntaxError: invalid syntax


#4

remove these from both sides of the word lloyd. [ ] Do it to the othe ones, too

supprimer les crochets de chaque côté du mot lloyd!


#5

so these : become these = and i remove [] ?


#6

Exactly.
So it looks like
lloyd = {
"noms"='Lloyd'
"devoirs"=[]
"quiz"=[]
"tests"=[]
}

souvenez-vous d'appuyer sur "solution" :wink:


#7

i had this as hint :v :
mon_dict = {
"key1": value,
"key2": value,
"key3": value
}


#8

It's about the syntax!
lloyd is not a list, so it is just 'lloyd', but 'devoir', 'quiz' and 'test' do, so their syntax is 'devoir' = [ ]
Did you got it?


#9

la suivante est faite avec la même idée:

alice = {
"noms" = 'alice'
"devoirs"=[]
"quiz"=[]
"tests"=[]
}

rappelez-vous que les ONM ne disposent pas d'une liste, il est donc juste une bibliothèque qui est le nom d'Alice.


#10

my bad i'm kind tired imo, thanks


#11

You are very welcome!!

Sorry for a stupid question, but can you press "solution" on my post because of I need them really for now. :relieved: