View the step-by-step solution to:


I have to make program that will allow a user to add, list, and delete items from a shopping list.


I need to make the program modular. I need to have an add_item(shopping_list) function, a delete_item(shopping_list) function, a display_list(shopping_list) function, a display_menu() function, and a main().

1. Add an item

2. List all items

3. Delete an item

4. Exit

Enter a menu option: 2

1 : bananas

2 : apples

Enter a menu option: 1

Please enter the item: pears

pears was added to the shopping list

Enter a menu option: 2

1 : bananas

2 : apples

3 : pears

Enter a menu option: 3

Which number to delete: 3

pears was deleted

Enter a menu option: 2

1 : bananas

2 : apples

Enter a menu option: 4

have a great day!

· The program should start with 2 items in the shopping list.

·  I need to include at the end of the program the code:

o  if __name__ == "__main__":


·        I need to use the code for the delete_item(shopping_list) function:

Top Answer

Source Code: def add_item (shopping_list) : """this function takes an argument which is list type to add value in it""" item... View the full answer

Screenshot from 2020-02-11 21-46-20.png

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question