American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

9 AM – Python OOP – Indo

September 2, 2023 @ 9:00 am - 10:00 am

Homework

Inside sep_2_grocery_shopping_cart_dictionary.py do the following

  1. Use item_price dictionary to replace
    1. Replace the 5 inside print(f”You purchase Milk for $5″)
    2. Replace the 4 inside print(f”You purchase egg for $4″)
    3. Replace the 6 inside print(f”You purchase Orange Juice for $6″)
  2. Create a new dictionary item_name dictionary. This is similar to item_price dictionary but the values would be the item names (“Milk”, “Eggs”, “Orange Juice”)
  3. Use item_name dictionary to replace
    1. “Milk” inside shopping_cart.append(“Milk”)
    2. “Eggs” inside shopping_cart.append(“Eggs”)
    3. “Orange Juice” inside shopping_cart.append(“Orange Juice”)

Details

Date:
September 2, 2023
Time:
9:00 am - 10:00 am
Verified by MonsterInsights