Python 3 exercise 14/14


#1

hi dears, maybe there is someone that can help me with this solution?
in the exercise it was asked to add the the dict “gold” another value , but i tried a lot of thing and nothing is property working. What im missing?

inventory = {
‘gold’ : 500,
‘pouch’ : [‘flint’, ‘twine’, ‘gemstone’], # Assigned a new list to ‘pouch’ key
‘backpack’ : [‘xylophone’,‘dagger’, ‘bedroll’,‘bread loaf’]
}

inventory[‘gold’].append(50)


#2

.append() is a list method, 500 is of type integer. That won’t go together

if we have have numbers (50 and 500), how do we add them together? Its basic math :slight_smile: