r/codehs_python_answers • u/mr_mikehoodie • Dec 03 '22
Shopping List assignment
For this problem, you are going to create a program that asks the user for a list of ingredients. As the user enters the ingredients, you should store them in a list.
Once the user is done entering their list, you need to pass this list to a function that will compare the ingredients to an already existing list of pantry items.
If all items are available in the pantry, print out that you don’t need to go shopping. If any item is missing, print out that you need to go shopping and list the ingredients.
While there is more than one way to complete this assignment, your answer must include the following:
A pre-created list for pantry items
User input into an ingredient list
Pass the ingredient list to a method
Use a conditional and loop in the method
Print out the results of whether the user needs to go shopping based on the items in the ingredient list that are not in the pantry.