Quotes help make search much faster. Example: "Practice Makes Perfect"

Tuesday, November 27, 2012

Codecademy: "Introduction to Lists"


#sample solution


zoo_animals = [ "pangolin", "cassowary", "sloth", "elephant"]
# One animal is missing!

print zoo_animals
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 " + str(zoo_animals[3])

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts