3/11 Stundents not defined


#1

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]

global error students not defined, but thats what I'm trying to define! Can someone please help


#2

Add a closing bracket "}" at the end here:


#3

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", "Lloyd"]

still getting the same error "Oops, try again. It looks like Lloyd is not in the students list."


#4

and when I try to print the students list it gets printed without any prob, but the same error repeats again and again......;(


#5

Here is how you access the elements in your students list:

print students[0:]


#6

I think that this topic will help you.


#7

thank u for your help..i have cleared it..


#8

thanks Juliet it helped me :smile: