It's dangerous to go alone take this


#1



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

I can't figure out how to add 50 to gold. right now I made it (I think) so it equals itself plus 50 but that's not what's happening


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() 

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

#backpack.remove('dagger')
del inventory[backpack.remove(1)]
in inventory['gold']=inventory['gold']+50


#2

HI this line

in inventory['gold']=inventory['gold']+50

you don't need of the in just remove it. then here

del inventory[backpack.remove(1)]

the del will remove the propriety backpack from the dictionary inventory ...but the instruction says
4.Then .remove('dagger') from the list of items stored under the 'backpack' key
so you should do it like that

inventory['backpack'].remove('dagger')

#3

thanks for responding it helped a lot. I would have replayed sooner but I was out of town.