This is KEY! 2/13 help


#1

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."
}


#2

I suggest putting it in the correct category...


#3

yes @cloudrunner04788 as @ragezapper has pointed you have to put the posts in the right category. it makes it easier for us to identify and test the solution on codeacademy
but anyways
here is the difference between and list and dictionaries
In python lists by default have key that are their indices numbered from 0 to n-1 where n is the size of the list (you can use enumerate to control the indices) but
if you don't want your keys to be just the default numbers but rather your own identifiers then you use dictionaries

For example

#imagine I have a list
random = ["Aardvark","Baa","Dab","Dab"]
#i can access an object with its index
print "The animal in this list is '%s'"%random[0]

#now  I have a dictionary

random = {
    "item 1":"Aardvark",
    "item 2":"Baa",
    "item 3":"Dab",
    "item 4":"Carpet"
}

#i can access an object with its key
print "The animal in this list is '%s'"%random["item 1"]

#4

numbers = [5, 6, 7, 8]

print "Adding the numbers at indices 0 and 2..."
print numbers[0] + numbers[2]
print "Adding the numbers at indices 1 and 3..."
print numbers[1] + numbers[3]
print "Adding the numbers at indices 2 and 4..."
print numbers[2] + numbers[3]


#5

none of that worked.


#6

You need to loop through the keys in the webster list;

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."
}

for key in webster:
    print webster[key]