# Homework 23, problem 2 -- solution. inventory = { "sword": 3.5, "shield": 5.0, "potion": 0.2, "map": 0.1, "coins": 0.05, } total = 0 for weight in inventory.values(): total += weight print(f"Total weight: {total:.2f}")