American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

5:00 PM – Python Object Oriented Programming – Sebastian

April 25, 2023 @ 5:00 pm - 6:00 pm

Today We Did
  1. Reviewed object oriented programming by making Dog class
  2. Deeply understood what “self” means, and when to use “self” instead of an object name
  3. Began GrocerySystemV2
  4. In case you need anything, feel free to email me at sebastian@ayclogic.com
Homework
  1. Name your homework APR25_grocery_system_hw, please submit by next Monday.
  2. 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.

Details

Date:
April 25, 2023
Time:
5:00 pm - 6:00 pm
Event Categories:
,
Verified by MonsterInsights