Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[10 marks] Write a function called ma in that takes no parameters and returns None. This function initializes an empty dictionary for the inventory, displays

image text in transcribed
[10 marks] Write a function called ma in that takes no parameters and returns None. This function initializes an empty dictionary for the inventory, displays a menu and wait for the user to make a selection, executes the selection, and displays the menu again until the exit selection is entered. Error checking must be implemented to ensure that only valid integers are entered as menu selections. This can be the same as in lab 1. Note: option 2 uses remove_item. For example: main() (1) Add an item to the inventory (2) Update an item in the inventory (3) Print the items in the inventory with there values (4) Quit Select option ( 1 to 4 ) : a Invalid option. Please enter a number between 1 and 4:A Invalid option. Please enter a number between 1 and 4 : Invalid option. Please enter a number between 1 and 4:5 Invalid option. Please enter a number between 1 and 4:0 Invalid option. Please enter a number between 1 and 4:4 Goodbye

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago