It's Dangerous to Go Alone! Take This


#1



https://www.codecademy.com/en/courses/python-beginner-en-pwmb1/2/5?curriculum_id=4f89dab3d788890003000096

Oops, try again. It looks like you do not have all the correct items in inventory["pocket"].

I though i might have got the adding 50 to gold wrong but it seems to be the 'pocket key' is missing an item. I have read the instruction time and time a again. All i see is 'seashell' , 'strange', 'berry',and lint. can you write inventory like this :
inventory.sort()['backpack'] or does it have to be like inventory['backpack'].sort() ? Help is very much appreciated


inventory = {
    'gold' : 500,
    'pouch' : ['flint', 'twine', 'gemstone'], # Assigned a new list to 'pouch' key
    'backpack' : ['xylophone','dagger', 'bedroll','bread loaf']
}

# Adding a key 'burlap bag' and assigning a list to it
inventory['burlap bag'] = ['apple', 'small ruby', 'three-toed sloth']

# Sorting the list found under the key 'pouch'
inventory['pouch'].sort() 

inventory['pocket'] = ['seashell','strange','berry','lint']
inventory['backpack'].sort()
inventory['backpack'].remove('dagger')# Your code here
inventory['gold'] = inventory['gold'] + 50


#2

I got it in the end, 'strange berry' is all one word


#3

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