π Class Activity: My Mini Snack Shop
π§ Part 1: Add Snacks to Your Shop
You are opening a small snack shop.
Start with an empty snack list.
Ask the user to type the name of a snack.
Add the snack to the list.
Do this three times for other snacks to add too.
After adding three snacks:
π Print the snack list.
Sample output message:
Your snack list is: ['Chips', 'Biscuits', 'Juice']
β Part 2: More Snacks Arrived!
Count how many snacks are already in your list.
Ask the user:
βHow many new snacks arrived?βUse + to add this number to the number you already have.
π Print the total number of snacks.
Sample output message:
You now have 5 snacks in your shop.
Example thinking:
If you had 3 snacks and 2 more arrived
3 + 2 = 5
β Part 3: Some Snacks Were Sold
Ask the user:
βHow many snacks were sold today?βUse β to subtract this number from your total.
π Print how many snacks are left.
Sample output message:
You have 3 snacks left.
Example:
5 β 2 = 3
ποΈ Part 4: Remove a Snack
Ask the user:
βEnter the snack number you want to remove.βRemove that snack from the list.
π Print the updated snack list.
Sample output message:
Updated snack list: ['Chips', 'Juice']
βοΈ Part 5: Change a Snack Name
Ask:
βEnter the snack number you want to change.βAsk:
βEnter the new snack name.βReplace the old snack with the new one.
π Print the updated snack list.
Sample output message:
Updated snack list: ['Chips', 'Cake', 'Juice']
π Final Question
If you have:
4 snacks
You add 3
Then 2 are sold
π Print the final answer.
Sample output message:
You have 5 snacks left.
