2. this is key!


#1


https://www.codecademy.com/en/courses/python-beginner-en-IZ9Ra/0/2?curriculum_id=4f89dab3d788890003000096#


I didn't have a error message, instead it let me pass. This is what i did:

The problem is it didn't print the definition of the values, it just print the values.


Replace this line with your code. 
webster = {
	"Aardvark" : "A star of a popular children's cartoon show.",
    "Baa" : "The sound a goat makes.",
    "Carpet": "Goes on the floor.",
    "Dab": "A small amount."
}

# Add your code below!
for webster in webster:
    print webster

sory for bad grammar, not a native speaker :C


#2

How is it that the iterator variable (the look-up) is the same as the object variable (dictionary)? Should these not be different?


#3

That's the exact problem. But anyways i'm on the next exercise, it let me pass with an wrong answer, i dont know what to do now :C


#4

You can re-do the exercise and play with it all you want now that you have a checkmark. Just go back and change the name of the iterator variable. Then print both the key and the value

for term in webster:
    print term, webster[term]

term in the above is known as the key, and webster[term] is the value.


#5

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