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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
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

Post 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply