American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

6:30 PM – Python Object Oriented Programming – Sebastian

April 11, 2023 @ 6:30 pm - 7:30 pm

Today We Did
  1. Finished library system project
  2. Began shopping cart OOP
  3. In case you need anything, feel free to email me at sebastian@ayclogic.com
Homework
  1. Name your homework APR11_supermarket_hw, please submit by next Monday.
  2. Homework: The following code exists in our old grocery_shopping_cart file that we want to replace:

    if selection == "99":
        break
    elif selection in items_inventory.keys():
        print(f"You have purchased {items_inventory[selection]} for ${items_price[selection]}")
            total_cost += items_price[selection]
        shopping_cart.append(items_inventory[selection])
    else:
        print("Invalid selection, please try again.")

    How can we add this to our while loop inside our ShoppingCartApplication class? Remember, all you need to use is:
    – self.menu_items dictionary attribute to get item names and prices
    – self.menu attribute to help see what each price and name means

Details

Date:
April 11, 2023
Time:
6:30 pm - 7:30 pm
Event Categories:
,
Verified by MonsterInsights