An order collects one customer's name, drink, flavor, and topping in a Python dictionary. The program gathers it, displays it for checking, then saves or cancels it. section 6.0 section 7.0
A small order workflow follows these steps:
- Create an empty dictionary with {}. section 7.0
- Store customer details and choices under keys such as name, drink, flavor, and topping. section 7.0
- Pass the order to a printing function so the customer can check it. section 6.0 section 7.0
- Save confirmed orders and return to the main menu; discard cancelled orders. section 6.0
A vanilla decaf order
The dictionary {'name': 'Erik', 'drink': 'decaf', 'flavor': 'vanilla', 'topping': 'chocolate'} represents Erik's completed order. A confirmation saves it; a cancellation forgets it. section 6.0 section 7.0
