Question: def add_items(a11_items): #your code here return all_items def delete_item(al1_items,item): #your code here return all_items #DO Not change the code below def main(): all_items = [honey,

 def add_items(a11_items): \#your code here return all_items def delete_item(al1_items,item): \#your code
here return all_items \#DO Not change the code below def main(): all_items

def add_items(a11_items): \#your code here return all_items def delete_item(al1_items,item): \#your code here return all_items \#DO Not change the code below def main(): all_items = ["honey", "ranch", "ketchup"] all_items=add_items(all_items) print("AlL items after adding new items = ", all_items) item=input("Which i them do you want to delete: ") items_after_del=delete_item(all_items, item) print("AlL items now = ;items_after_del) You are hired by a grocery store manager to write a program which adds items and delete an item from the grocery store. Here are the instructions: 1. Write a function named add_items which takes a list of existing items as a parameter and adds new items to that list. After adding each item, the function should ask if the user wants to continue adding new items to the list. As long as the user's answer starts with " y " or " Y ", the function must keep asking the new item. 2. Write a second function that named delete_item that takes the item list and to be deleted item as inputs. Then, the function returns the updated list after deletion. If the item is not in the grocery store, give a message as "There is no such item." * main function is already given to you. Do not forget to use the starter code. Sample Outputs Item name: onion Do you want to continue adding items?: = Yes Item fiame: tea Do yot want to continue adeding items?: No A1l itura after adding new itemis = ['honey', 'ranch', 'ketchup', 'onion', 'teat'. Which item do you want to delete? ranch All. itemas now = ("honey', ' ketchup', ' onion', ' cea'l Itam mume: garlie Do you wrant to continue adding 1tamax : Y Item. namez-tea. Do yelf watit to-continue adding itene?? nope Whichistern do you want to terfezeg mustard

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!