12. Changing Your Mind


#1



https://www.codecademy.com/courses/python-beginner-en-pwmb1/2/3?curriculum_id=4f89dab3d788890003000096

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


#2

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


#3

sigh

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


#4

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