Introduction to Lists


#1

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


#2

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


#3

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


#4

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]


#5

that was my code and its not working


#6

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


#7

plse answer as soon as you can


#8

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