Dangerous to go Alone


#1



It's Dangerous to go alone


Oops, try again. Did you accidentally delete the inventory dictionary? Click Reset Code to get back to the original code.

File "python", line 17
inventory['gold']=inventory['gold']+50
^
SyntaxError: invalid syntax


Not sure what I'm doing wrong here, any ideas? I didn't change the original code at all and have tried resetting.


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']=inventory['gold']+50


#2

this line:

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

.remove( is missing a ) to close it


#3

Ugh. (Facepalm) Thank you.


#4

thanks for the help :slight_smile:


#5