7/14 It's Dangerous To Go Alone! Take this


#1

Can someone please help me? I have tried a few ways and none have worked!!!!!!!!! :frowning:

EXISTING CODE:

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

INSTRUCTIONS:

Add a key to inventory called 'pocket'
Set the value of 'pocket' to be a list consisting of the strings 'seashell', 'strange berry', and 'lint'
.sort() the items in the list stored under the 'backpack' key
Then .remove('dagger') from the list of items stored under the 'backpack' key
Add 50 to the number stored under the 'gold' key


#2
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()
inventory["backpack"].remove("dagger")
inventory['gold']=550


#3

Post intact code and explain what you expect to happen and what does happen - otherwise we have nothing to look at and no idea what to look for!


#4

Ok I don't have the laptop with me right now. Sorry, I'll send it later