constant reporting for inventory management...)
# as in all games there is a special way to do this that actually makes money and solves the
problem...can you find 'them'? Do you know why? May require knowledge of actual python 'lore'
#create stores
freelancers = {'name':'freelancing Shop','brian': 70, 'black knight':20, 'biccus diccus':100, 'grim
reaper':500, 'minstrel':-15}
antiques = {'name':'Antique Shop','french castle':400, 'wooden grail':3, 'scythe':150,
'catapult':75, 'german joke':5}
pet_shop = {'name':'Pet Shop','blue parrot':10, 'white rabbit':5, 'newt': 2}
#create an dempty shopping cart
cart = {}
#loop through stores/dicts
for shop in (freelancers,antiques,pet_shop) :
#inputbox to show what you can buy...capture textstring of what was bought...make lowercase
buy_item = input(f'Welcome to {shop["name"]}! what do you want to buy: {shop}').lower()
#update the cart
cart.update({buy_item:shop.pop(buy_item)}) # use pop...
buy_items = ", ".join(list(cart.keys()))
print(f'You Purchased {buy_items}. Today it is all free. Have a nice day of mayhem!')
stuff or add it up
#ver 1.2 add ability to exit a store without buying and go to next by typing 'exit', and to exit if
a nonexistant item is bought(typed)
#Add purse with 1000 gold pieces and payment for the items during or at end of code and show a
message about total cost and how much gold you have left
#ver 1.4 random bug fix, ' browser compatability', refactoring code... basically being lazy ..stop
scrolling TikTok/Facebook! ;-)
#Ver 1.5 print inventory before and after purchases as one department_store of stuff(combine
inventories from all stores into one...pretend Big Biz bought all the local stores, and want