« All Events
5:30 PM – Intro To Python – Gamas
February 17, 2023 @ 5:30 pm - 6:30 pm
Homework
- Continue on Feb10_GroceryShoppingCart.py
- Add codes so after you are “done”, the program will list all items that the user purchase. You have to create a list to keep track of the items the user purchase.
- For example:
-
What do you want to purchase:
1. Frozen Pizza - $10
2. Ice cream - $ 4
3. Bread - $ 6
4. Orange Chicken - $11
Enter "done" to pay: 1
You have purchased Milk for $5
What do you want to purchase:
1. Frozen Pizza - $10
2. Ice cream - $ 4
3. Bread - $ 6
4. Orange Chicken - $11
Enter "done" to pay: 1
You have purchased Milk for $5
What do you want to purchase:
1. Frozen Pizza - $10
2. Ice cream - $ 4
3. Bread - $ 6
4. Orange Chicken - $11
Enter "done" to pay: 2
You have purchased Ice Cream for $4
What do you want to purchase:
1. Frozen Pizza - $10
2. Ice cream - $ 4
3. Bread - $ 6
4. Orange Chicken - $11
Enter "done" to pay: 4
You have purchased the following items:
MILK
MILK
ICE CREAM
Please pay $14, thank you for your business.