Python
prices = {"apple": 2, "bread": 3, "milk": 4}

# Write total_cost(items, prices): sum of prices[item] for each item in items.
def total_cost(items, prices):
    pass

# Write total_cost_safe(items, prices): same, but items missing from prices count as 0.
def total_cost_safe(items, prices):
    pass