Page 1 of 1

Python. Using a dictionary with string keys and integer values, implement a simple database for tracking different items

Posted: Mon May 02, 2022 12:05 pm
by answerhappygod
Python.
Using a dictionary with string keys and integer values, implement a simple database for tracking different items and their quantities in inventory. That is, for a dictionary dict, dict['apples'] == 47represents 47 apples in the inventory.
The posted starting code provides a framework for the user to enter different commands as a single letter: A adds an item to the
inventory, V views the current contents of the inventory, R removes some quantity of an item in the inventory, and Q exits the program. Specifically:
All the above except for Add(A) and Remove(R) are implemented in the starting code. Your submitted code should implement both, thus completing this application.