For this task, you are required to write a Python program for an inventory management system designed to manage an electronics store.
Instructions
Electronics Store Inventory Management System consists of the following parts: Product Information:
Each electronic product is uniquely identified by a product code. Product information includes the product name, brand, category, price, and available stock. Use a list of dictionaries to represent the products, where each dictionary contains information about a specific product.
Supplier Information:
Each supplier is uniquely identified by a supplier code. Supplier information includes the supplier name, contact details, and a list of products they supply. Use a dictionary to represent the suppliers, where each key is the supplier code, and the corresponding value is a dictionary containing supplier details.
Inventory Functions: you must implement the following functions:
- add_product(products, product_code, product_name, brand, category, price, stock)
- add_supplier(suppliers, supplier_code, supplier_name, contact_details)
- search_product(products, product_code)
- display_products(products)
- display_suppliers(suppliers)
- update_stock(products, product_code, new_stock)
The methods should interact with the product and supplier information using appropriate data structures.
- Menu (Options): Implement a menu function that displays the following options: 1: Add Product
2: Add Supplier
3: Search Product
4: Display Products
5: Display Suppliers
6: Update Stock
7: Exit Main function: Create a main function that initialises empty lists and dictionaries for products and suppliers. Implement a loop that repeatedly displays the menu, takes user input