First page Back Continue Last page Overview Image

Solutions, Part1

supermarket = { "milk": {"quantity": 20, "price": 1.19},

"biscuits": {"quantity": 32, "price": 1.45},

"butter": {"quantity": 20, "price": 2.29},

"cheese": {"quantity": 15, "price": 1.90},

"bread": {"quantity": 15, "price": 2.59},

"cookies": {"quantity": 20, "price": 4.99},

"yogurt": {"quantity": 18, "price": 3.65},

"apples": {"quantity": 35, "price": 3.15},

"oranges": {"quantity": 40, "price": 0.99},

"bananas": {"quantity": 23, "price": 1.29}}

customers = ["Frank", "Mary", "Paul"]

shopping_lists = {"Frank" : [('milk', 5), ('apples', 5),

('butter', 1), ('cookies', 1)],

"Mary": [('apples', 2), ('cheese', 4),

('bread', 2), ('pears', 3),

('bananas', 4), ('oranges', 1),

('cherries', 4)],

"Paul": [('biscuits', 2), ('apples', 3),

('yogurt', 2), ('pears', 1),

('butter', 3), ('cheese', 1),

('milk', 1), ('cookies', 4)]}