Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 4 Work flow is a major part of programming. In this problem you will create a small list. This list can contain the following
Problem Work flow is a major part of programming. In this problem you will create a small list. This list can contain the following to start bmw audi toyota
subaru. Now print the following menu to the user:
Menu Options:
Add an item to the list
Remove an item from the list
View an item to the list
Then prompt the user to enter a choice. The choice should be given as a numerical input. If the user enters then this will take the user to a set of choices,
prompt the user to collect what they would like to add to the list and in what index, if the index is left empty it should be appended to the end of the list.
Otherwise if an index location is given then insert the item at the specified location and print the updated list. Print the sorted list.
If the user enters a then the user will be asked to provide an index location of the item they want to be removed. Using the pop method then remove the item
at the index location. For example, say they enter then the third item is removed. The output should print the following: "Removed: toyota" from the list.
Finally, print the list.
If the user enters Then prompt the user to enter an index. "Please enter the idex of the item you wish to view:" if the user enters an index then you should
simpl print out the item, for example, "The item you requested is bmw
If user enters anything else but thei will result in an error statement:"Invalid choice. Please try again."
This should be a one way trip. Do not attempt to create a loop of any kind.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started