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.
Python. Using a dictionary with string keys and integer values, implement a simple database for tracking different items
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Python. Using a dictionary with string keys and integer values, implement a simple database for tracking different items
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!