12. Changing Your Mind



Traceback (most recent call last):
File "python", line 9, in
NameError: name 'zoo_amimals' is not defined

I expect it to print zoo_animals with Rockhopper Penguin being in the Jungle house.

# key - animal_name : value - location 
zoo_animals = { 'Unicorn' : 'Cotton Candy House',
'Sloth' : 'Rainforest Exhibit',
'Bengal Tiger' : 'Jungle House',
'Atlantic Puffin' : 'Arctic Exhibit',
'Rockhopper Penguin' : 'Arctic Exhibit'}

del zoo_animals['Unicorn']
del zoo_amimals['Sloth']
del zoo_animals['Bengal Tiger']

zoo_animals['Rockhopper Penguin'] = 'Jungle House'

print zoo_animals


Its written in error message,You made a typo,right?



Yep. I is a little difficult to see that on my screen. Thanks.


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