Student Becomes the Teacher


#1



I've done this lesson before and it took me back to it -- now it wont work?? Help me please --

11. Student Becomes Teacher, is what I'm stuck on please help -_-


It should work but i doesn't -_-


   lloyd = {
        "name": "Lloyd",
        "homework": [90.0, 97.0, 75.0, 92.0],
        "quizzes": [88.0, 40.0, 94.0],
        "tests": [75.0, 90.0]
    }
    alice = {
        "name": "Alice",
        "homework": [100.0, 92.0, 98.0, 100.0],
        "quizzes": [82.0, 83.0, 91.0],
        "tests": [89.0, 97.0]
    }
    tyler = {
        "name": "Tyler",
        "homework": [0.0, 87.0, 75.0, 22.0],
        "quizzes": [0.0, 75.0, 78.0],
        "tests": [100.0, 100.0]
    }    
    students = ['lloyd', 'alice', 'tyler']


#2

your students shouldn't be in quotes! :smiley:

@kyleaw we be thunder and lightning xD


#3

should not be quotes

@bibleman13 beat me to it :wink:

also, i bet you meant lightning; look up what 'lightening' is.


#4

Loool @kyleaw and @bibleman13 y'all replied at the exact same time :joy:


#5

I think they call that a photo finish :stuck_out_tongue:

and @kyleaw ..... I looked it up.... yeah I meant lightning... I will correct that....


#6

Well whatever it was it was pretty cool :sweat_smile:


#7

That's us! :sunglasses:
You're pretty awesome too.
I think we're spamming this poor fellow's topic though!


#8

Why should they not be in quotes??


#9

   lloyd = {
        "name": "Lloyd",
        "homework": [90.0, 97.0, 75.0, 92.0],
        "quizzes": [88.0, 40.0, 94.0],
        "tests": [75.0, 90.0]
    }
    alice = {
        "name": "Alice",
        "homework": [100.0, 92.0, 98.0, 100.0],
        "quizzes": [82.0, 83.0, 91.0],
        "tests": [89.0, 97.0]
    }
    tyler = {
        "name": "Tyler",
        "homework": [0.0, 87.0, 75.0, 22.0],
        "quizzes": [0.0, 75.0, 78.0],
        "tests": [100.0, 100.0]
    }    
    students = [lloyd, alice, tyler]

#10

LOL
xD
:smile:
:smiley_cat:


#11

It didn't work :frowning:


#12

Spam me all you like xD IDC
Heheheh


#13

I just copy and pasted your code into my lesson as is and it worked fine so idk what your problem is now. Make sure your indention is correct at all levels. Also,

Lets hope that was not a sexually explicit meaning behind that comment...


#14

Sometimes you need to refresh, so try that.

+1 loool


#15

Yea, no its not LOL
:slight_smile:


#16

ok i will refresh my page -_-


#17

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


#18

  File "python", line 7
    alice = {
   ^
IndentationError: unexpected indent

#19

Hmmm. Make sure your indentation is correct.
Highlight all of the code and press shift + tab. Normally we don't recommend using tab, but to unindent everything, this may help.


#20

Oops, try again. The quizzes key does not have the value "[]" in your lloyd dictionary.