EDWARD A. answered 02/02/23
PhD Data Scientist: R, Tableau, Dashboards, Graphpad, Bioinformatics
inventory = {'rope': 1, 'torch': 6, 'gold coin': 42, 'dagger': 1, 'arrow': 12, 'map fragments': 3}
print("Inventory:")
total_items = 0
for item, quantity in inventory.items():
print(f"{quantity} {item}")
total_items += quantity
print(f"Total number of items : {total_items}")