- This event has passed.
5PM – Summer Intro to Python
August 4, 2021 @ 5:00 pm - 7:00 pm
What We Did Today
1. We created ShoppingCart with Object Oriented Programming
2. We learned how to assign object values to a Dictionary key
3. We learned more about the practicality of Objected Oriented Programming
Homework
Using the grocery variable in the else statement I want you guys to be able to print out the bolded statements below, so if the user selects “1” it should print “You have purchase Milk for $5”:
What do you want to purchase: 1. Milk - $5 2. Eggs - $4 3. Orange Juice - $6 4. I am done, checkout please Enter your selection: 1 You have purchase Milk for $5 What do you want to purchase: 1. Milk - $5 2. Eggs - $4 3. Orange Juice - $6 4. I am done, checkout please Enter your selection: 2 You have purchase Eggs for $4
You should also add the “grocery” variable into the list shopping_cart. Overall this shouldn’t be too difficult it can all be done in two lines of code.
If you guys have any questions you can email me at sohan@ayclogic.com