« All Events
9 AM – Python OOP – Indo – Gamas
October 21, 2023 @ 9:00 am - 10:00 am
What We Did
- We converted grocery shopping cart to use ProductItem dictionary.
- We generated the menus when we run the program using for loop.
Homework
- Create a new file robux_item.py and inside this file, create a new Class RobuxItem.
- Inside RobuxItem class, add 2 attributes: name, price.
- Inside oct_21_robux_shopping_cart_using_class.py
- create a new dictionary robux_items
- Inside this dictionary, the keys would be – 1,2,3,4,5 and the values would be RobuxItem classes.
- Change inside while loop to use this single dictionary.
- And also produce the menu when you run the program.