It's Dangerous to Go Alone! Take This


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['pocket'] = ['seashell','strange','berry','lint']
inventory['backpack'].remove('dagger')# Your code here
inventory['gold'] = inventory['gold'] + 50


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


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