Introduction to Lists


What is the significance of Line 4: if len(zoo_animals) > 3:


What do you mean, with no code i can't tell?:confused:


he means that without the code he cant say what your mistake is plus I am having trouble with this code to


zoo_animals = ["pangolin", "cassowary", "sloth", ];

One animal is missing!

list_name = [item_1, item_2]
if len(zoo_animals) > 3:
print "The first animal at the zoo is the " + zoo_animals[0]
print "The second animal at the zoo is the " + zoo_animals[1]
print "The third animal at the zoo is the " + zoo_animals[2]
print "The fourth animal at the zoo is the " + zoo_animals[3]


that was my code and its not working


and it say this when I click save and submit code

Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: name 'item_1' is not defined


plse answer as soon as you can


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