Why isn’t my Rockhopper Penguin value accepted?


Why isn’t my Rockhopper Penguin value accepted?


Take a careful look at the instructions and be sure to set the "Rockhopper Penguin"’s value to anything but its current value of "Arctic Exhibit".
If you think you have done this and it still doesn’t work, check that you’re properly spelling the penguin’s key name and the list name, and use brackets [] to access a dictionary key value.

1 Like

Why cannot I put several deletes in one statement
e.g. del zoo_animal [“Sloth” , “Tiger”]


I too, am curious if there are shorter ways for deleting multiple items?

you can delete serveral things at once, but you can only do a single key lookup (to get the associated value). Knowing this, you can transform your code to:

del zoo_animals['Sloth'], zoo_animals['Bengal Tiger']

Penguins live almost entirely in the Southern Hemisphere and are common to Antarctica, Argentina, Australia, Chile, New Zealand and South Africa.
So, is incorrect to put them in the “Arctic Exhibit” :slight_smile:


Please, if we have the days of the week, Monday to Sunday…day 1 to day 7. What will we take as key and as value ?

that depends, if you let the user of your application enter days, i would also make the days the keys of the dictionary, and the number the values

And if we did it inversely ie we make the days as the values of the dictionary, and the number as the keys. In that case, it’s when the user of application enters numbers ?

Le jeu. 14 févr. 2019 à 08:47, Stetim94 via Codecademy Forums [email protected] a écrit :

yes, then you are making things a lot easier for yourself

Also, make sure that the location is in quotation marks! The last exercise had values as floats or integers, so some people might forget them since they were so used to only using strings for the keys and not using them for values.

1 Like

Why upon print zoo_animals it’s printing only Values and not Keys?

whats the difference between .remove and del ?

Someone already wrote an extensive blog post about it:

What Is Difference Between Del, Remove and Pop on Python Lists? - GeeksforGeeks

I don’t know why view solution is “‘Plains Exhibit’”
No mention of the word "Plains Exhibit in the hint.

Hey man, do you know what to write, when you want to change the “Rockhopper Penguin” to something else. Like, “Polar bears : Artic Exhibit” ?