BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//American Young Coder - ECPv6.10.1.1//NONSGML v1.0//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-ORIGINAL-URL:https://www.ayclogic.com
X-WR-CALDESC:Events for American Young Coder
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-Robots-Tag:noindex
X-PUBLISHED-TTL:PT1H
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
DTSTART:20230312T100000
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:PST
DTSTART:20231105T090000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20230411T170000
DTEND;TZID=America/Los_Angeles:20230411T180000
DTSTAMP:20260425T090942
CREATED:20230412T024452Z
LAST-MODIFIED:20230412T024452Z
UID:18894-1681232400-1681236000@www.ayclogic.com
SUMMARY:5:00 PM – Python Object Oriented Programming – Sebastian
DESCRIPTION:Today We Did\n\nStarted and quickly finished GroceryShoppingCart (great job!)\n Brief introduction to OOP\, sneak peak of the following:\nClasses\, Attributes\, Methods\, Constructors\, and Objects\nIn case you need anything\, feel free to email me at sebastian@ayclogic.com\n\nHomework\n\nName your homework APR11_robux_hw\, please submit by next Monday.\nHomework: Recall your old RobuxShoppingCart assignment:\n \nmenu = """\nWhat do you want to do: \n1. Buy hat 100 Robux\n2. Buy hair 150 Robux\n3. VIP Server 500 Robux\n4. Add more Robux\n5. Exit\nEnter your selection: """\n\nshopping_cart = []\nrobux = 300\n\ndef handle_transaction(price\, item_name):\n    global robux\n    if robux < price:\n        print(f"You only have {robux} robux remaining. Therefore you cannot purchase {item_name} for {price} robux.")\n    else:\n        robux -= price\n        print(f"You purchased a {item_name}. You have {robux} robux remaining.")\n        shopping_cart.append(item_name)\n\nprint(f"Welcome to Robux Bank\, you have {robux} robux in the beginning.")\n\nwhile True:\n    selection = input(menu)\n    if selection == "5":\n        break\n    elif selection not in("1"\,"2"\,"3"\,"4"\,"5"):\n        print("invalid selection")\n    elif selection == "1":\n        handle_transaction(100\, "Hat")\n    elif selection == "2":\n        handle_transaction(150\, "Hair")\n    elif selection == "3":\n        handle_transaction(500\, "VIP Server")\n    elif selection == "4":\n        credit_card_number = input("Enter your Credit Card number: ")\n        if credit_card_number == "ABCD1234":\n            robux += 200\n            print(f"Thank you for purchasing 200 Robux. You now have {robux} robux remaining.")\n        else:\n            print("You have entered an invalid credit card number")\n\n\nprint("\nYou have purchased the following items:")\ncount = 1\nfor item in shopping_cart:\n    print(f"{count}. {item.title()}")\n    count += 1\n\nprint(f"Your remaining Robux balance is {robux} Robux.")\nTry your best to recreate this with two dictionaries: \n– input_name\n– selection_price \nThese should map the selection to the name (hat\, hair\, VIP server\, add more robux)\, and map the selection to the price (100\, 150\, 500\, 200).
URL:https://www.ayclogic.com/event/500-pm-python-object-oriented-programming-sebastian-2/
CATEGORIES:OOP Python,Python Class
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=America/Los_Angeles:20230411T183000
DTEND;TZID=America/Los_Angeles:20230411T193000
DTSTAMP:20260425T090942
CREATED:20230412T023634Z
LAST-MODIFIED:20230412T023634Z
UID:18892-1681237800-1681241400@www.ayclogic.com
SUMMARY:6:30 PM – Python Object Oriented Programming – Sebastian
DESCRIPTION:Today We Did\n\nFinished library system project\nBegan shopping cart OOP\nIn case you need anything\, feel free to email me at sebastian@ayclogic.com\n\nHomework\n\nName your homework APR11_supermarket_hw\, please submit by next Monday.\nHomework: The following code exists in our old grocery_shopping_cart file that we want to replace:\n \n\nif selection == "99":\n    break\nelif selection in items_inventory.keys():\n    print(f"You have purchased {items_inventory[selection]} for ${items_price[selection]}")\n        total_cost += items_price[selection]\n    shopping_cart.append(items_inventory[selection])\nelse:\n    print("Invalid selection\, please try again.")\nHow can we add this to our while loop inside our ShoppingCartApplication class? Remember\, all you need to use is:\n– self.menu_items dictionary attribute to get item names and prices\n– self.menu attribute to help see what each price and name means
URL:https://www.ayclogic.com/event/630-pm-python-object-oriented-programming-sebastian-13/
CATEGORIES:OOP Python,Python Class
END:VEVENT
END:VCALENDAR