- This event has passed.
5:00 PM – Python Object Oriented Programming – Sebastian
April 25 @ 5:00 pm - 6:00 pm
Today We Did
- Reviewed object oriented programming by making Dog class
- Deeply understood what “self” means, and when to use “self” instead of an object name
- Began GrocerySystemV2
- In case you need anything, feel free to email me at email@example.com
- Name your homework APR25_grocery_system_hw, please submit by next Monday.
- Homework:a) Finish creating the “inventory” dictionary, which maps every selection number to a GroceryItem object for every item (Milk, Eggs, Orange Juice and their prices)
b) Begin the while loop (store user input into selection variable, break if selection is 4), and try to think of an efficient way to check if the selection made by the user is a valid selection.
Hint: Make use of your “inventory” dictionary, which has all valid selections in it. How can you check if the selection is one of those valid selections?
If the selection is invalid, print a similar error message as GrocerySystemV1. If it is valid, print(“Valid”) for now, and we’ll pick back up from there in class next time.