Late Arrivals and List Length returning "Did you remember to append() three items to suitcase?"


#1

Followed the instructions and entered the following code:

suitcase = ["shirts", "socks", "pants", "underwear"] 
suitcase.append("sunglasses")


suitcase.append("sunscreen")
suitcase.append("iPod")
suitcase.append("camera")

list_length = len(suitcase) # Set this to the length of suitcase

print "There are %d items in the suitcase." % (list_length)
print suitcase

It looks like it outputs fine, but I can't advance to the next lesson, as I keep getting an error message which reads "Oops! Try again. Did you remember to append() three items to the suitcase?" As far as I can tell, I did. I have tried this in both Firefox and Chrome, same result. It looks like there are a lot of people who have run into this problem but I couldn't find out what was wrong from any of the previous forum topics. Please let me know what's up!


#2

Begin with an empty list.

suitcase = []

so you end with 4 items.


#3

You should not change the value of suitcase on the first line. Codecademy checks if there are 4 elements in the suitcase at the end of your code.

You have to change the first line to original form:

suitcase = []

#4

Thanks for the tip. This worked. The wording of the exercise was a bit confusing, I think.


#5

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