Its Dangerous to go alone. Take this!


#1



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


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


I don't exactly know.


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

# 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['backpack'].sort()
# Your code here
inventory['backpack'].remove('dagger')
inventory['gold']=inventory['gold'] + 50


#2

Missing comma after list.


#3

Thank you so much! I didn't even see that!


#4

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