Question: 1. Create a program that will update a store inventory. Create a function that will add a new category into the inventory. Create a function

1. Create a program that will update a store inventory.

  • Create a function that will add a new category into the inventory. Create a function that will delete a category from inventory. Create a function that will add a new item into a category. Create a function that will delete an item from inventory. Create a function that will change the count of an item (e.g. apple/pear).
  • Create a function that will print the inventory
  • Use the given dictionary
  • Use a main -function
  • The program should continue until the user types in Exit or 0 (zero)
  • The program should give the user the following menu:

Program to change inventory: Type in corresponding number

  1. Add category
  2. Delete category
  3. Add item
  4. Delete item
  5. Change item
  6. Print inventory

0. Exit

Dictionary:

inventory = {

'fruit': {

'apple': 250,

'pear': 500,

'orange': 10

},

'vegetable': {

'cucumber': 300,

'broccoli': 100

}

}

Help would be very appreciated, thank you.

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 Databases Questions!