Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please help! .. Programming Question Difficult #2 Given the function definitions below write a program that prompts the user with a menu to make selections;
please help!
.. Programming Question Difficult #2 Given the function definitions below write a program that prompts the user with a menu to make selections; to add items to their shopping list, remove items from their shopping list, to sort items in their shopping list, to print items in their shopping list, and to quit shopping. You should create a main function where you print the menu and get user input. NOTE: You must use your own unique variables and arguments For example: #This function adds an item to the shopping list, if it isn't present in the list #Output if it is added to or was already in the list, return the list def additem(someltem, someList): type your solution here return someList ** #This function removes items, if they are present, from the shopping list #Output if the item is removed from or not in the list, return the list def removeltem(someltem, someList): type your solution here ** return someList ** #This function returns the sorted shopping list def sortList(someList): type your solution here ** return someList ** #This function prints the shopping list, as a numbered list def printList(someList): print(" Your list contains the following items: ") type your solution here ** ** #This function prints the menu def printMenu(): print(++++ SELECT FROM THE MENU ++++") print(" (a)dd items, emove items, (s)ort items, Ingrint items, (q)uit") print(). def addItem( someItem, someList): type your solution here return someList def removeItem( someItem, someList): ** type your solution here ** return someList def sortList(someList): type your solution here ** return someList def printList(someList): print(" Your list contains the f ** type your solution here ** def printMenu(): print("++++ SELECT FROM THE MENU print(" (a)dd items", " (r)emove items", " (s)ort items", " (p)rint items", " (q)uit") print()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