Question: Problem 2 : Inventory Management System Write a program to manage an inventory of items in a store. Create a function add _ item (

Problem 2: Inventory Management System
Write a program to manage an inventory of items in a store.
Create a function add_item(inventory, item) that adds an item to a list of inventory items.
Create another function remove_item(inventory, item) that removes an item from the inventory if it exists.
Use a loop and a decision structure to display a menu:
Option 1: Add an itemOption 2: Remove an itemOption 3: Display all itemsOption 4: Exit
The program should keep looping until the user selects Exit.
Menu:
1. Add an item
2. Remove an item
3. Display all items
4. Exit
Enter an option: 1
Enter item name: Apples
Inventory: ['Apples']

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!