Answered step by step
Verified Expert Solution
Link Copied!

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;

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedplease 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

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

How many molecules are present in 0.336 mol of acetylene (C2H2)?

Answered: 1 week ago

Question

=+2 How can the effectiveness of global virtual teams be improved?

Answered: 1 week ago

Question

=+1 What are the major issues related to international T&D?

Answered: 1 week ago