Mini Project: Shopping List Manager
Project Overview:
We will create a Python program that allows users to manage a shopping list. Users will be able to add items, remove items, and view their list.
Project Requirements:
User Input:
- The name of the item to add to the shopping list.
- The name of the item to remove from the shopping list (if applicable).
Conditional Statements:
- Before removing an item, the program will check if the item exists in the list and display an appropriate message if it does not.
- The program will inform the user if the list is empty when attempting to view or modify it.
Output:
- A confirmation message when an item is successfully added or removed.
- A summary of the current shopping list
- A message when exiting the program.
Lesson 3
Learning Intention:
- I understand how to create and manipulate lists
- I understand how to manipulate strings with lower, upper and capitalize.
- I understand how to use conditional statements to run checks on my shopping list
| Activity | Description | Assessment Criteria |
|---|---|---|
| Program Implementation |
We need to add a list to our program so that we can begin to add and remove items from it. We do this in a similar way to declaring a variable but we contain the information in square brackets "[ ]" The below code in the add_item function will allow the user to add items to their newly created list. Lets go through it together and look at some of the key features.
Once you've coded your add and remove functions now its time to check what items we have in our list. The below code will check to see if the shopping_list list has any items in it. If it has items it will use the for loop to run through and print each item. If there are no items it will tell the user there are no items. Use the remainder of today's lesson to add additional small features to your shopping list program to improve usability with the support of your teacher, |
proficient implementation of a program that includes functioning and purposeful use of iteration, conditional statements, functions, variables and user input. |