Someone stole some of your stuff. You have insurance that will cover the cost to replace them up to a certain limit. Create a function that returns the amount that isn't covered when given a limit and a dictionary of all stolen items and their value. If the insurance covers the cost of all items then return 0
.
calc_uncovered({ "baseball bat": 20 }, 5) ➞ 15
calc_uncovered({"skate": 10, "painting": 20 }, 19) ➞ 11
calc_uncovered({"skate": 200, "painting": 200, "shoes": 1 }, 400) ➞ 1
- The dict data always contains at least an item (no empty objects).