4/14 I don't know this


#1

I am having trouble with 4/14.
here is my code:
suitcase = []
suitcase.append("sunglasses")

Your code here!

list_length = len(suitcase)
suitcase.append("passport")
suitcase.append("clothes")
suitcase.append("memo")

list_length = suitcase# Set this to the length of suitcase

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

suitcase = []
suitcase.append("sunglasses")

suitcase.append("shirts")
suitcase.append("pants")
suitcase.append("money")

list_length = len(suitcase)

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

list_length = ________ # Set this to the length of suitcase

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


#2

tryjust this:

suitcase = []
suitcase.append("sunglasses")

suitcase.append("passport")
suitcase.append("clothes")
suitcase.append("memo")

list_length = len(suitcase)

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


attention:
-you have repeated some code lines
- this code line : list_length = len(suitcase) , should be after this 3 code lines: suitcase.append("passport")
suitcase.append("clothes")
suitcase.append("memo")

  • and remove this line : list_length = suitcase# Set this to the length of suitcase
    thats is the main error you have to put list_lenght = len(suitcase), to return a number in the final print

#3

A post was split to a new topic: 4/14


#4