Dictionaries (dict): A collection of key-value pairs.
Instead of using numeric index numbers, you look up values using unique keys (like looking up a word in a real dictionary). They are mutable.
Scenario: You are building a Bill management system for a cafe. The program needs to let the manager update the product catalog (add new items or edit existing ones) and also allows to generate the bill for customers.
our program needs to:
Store products in a nested dictionary using item codes as keys (e.g., {1: {"name": "Coffee", "price": 120}}).
Provide a main menu with options to View Menu, Add Item, Edit Item, Delete Item, Generate Bill, and Exit.
Use a while loop and match-case to handle navigation.
Apply an automatic 10% discount during checkout if the total bill exceeds 1000 Rs.