- This event has passed.
3 PM – Python OOP – Gamas
July 11 @ 3:00 pm - 4:00 pm
Today We Did
- We reviewed the june_27_grocerry_shopping_cart_v2.py homework.
- ]We created july_11_grocery_shopping_cart_v3.py and eliminate code duplications and generate the menu according to item_names and item_prices dictionaries.
Homework
- Modify july_11_grocery_shopping_car_v3.py so it will display item purchases with index number starting from 1
-
What do you want to purchase: 1. Muffin - $10 2. Eggs - $15 3. Orange Juice - $6 4. Donuts - $1 5. Steak- $20 Enter your selection 1 to 3 (Enter 'exit' for quit): 1 You have purchased Muffin for $10 What do you want to purchase: 1. Muffin - $10 2. Eggs - $15 3. Orange Juice - $6 4. Donuts - $1 5. Steak- $20 Enter your selection 1 to 3 (Enter 'exit' for quit): 2 You have purchased Eggs for $15 What do you want to purchase: 1. Muffin - $10 2. Eggs - $15 3. Orange Juice - $6 4. Donuts - $1 5. Steak- $20 Enter your selection 1 to 3 (Enter 'exit' for quit): 3 You have purchased Orange juice for $6 What do you want to purchase: 1. Muffin - $10 2. Eggs - $15 3. Orange Juice - $6 4. Donuts - $1 5. Steak- $20 Enter your selection 1 to 3 (Enter 'exit' for quit): exit You have purchased the following items: 1. Muffin 2. Eggs 3. Orange juice You have to pay $31.