fix: fixed first person language in discount calculator workshop (#67426)

Signed-off-by: Lakshminarasimhan <137640490+narasimhan-lakshmi@users.noreply.github.com>
Co-authored-by: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com>
This commit is contained in:
Lakshminarasimhan
2026-05-15 20:37:55 +05:30
committed by GitHub
parent a2e0622ccb
commit cdb7c75332
3 changed files with 3 additions and 3 deletions
@@ -7,7 +7,7 @@ dashedName: step-19
# --description--
Let's test your new discount strategy. After the existing code, create an instance of `FixedAmountDiscount` with an amount of `5` and assign it to a variable named `fixed_discount`. Then apply this discount to the product and print the result.
You can now test the new discount strategy. After the existing code, create an instance of `FixedAmountDiscount` with an amount of `5` and assign it to a variable named `fixed_discount`. Then apply this discount to the product and print the result.
# --hints--
@@ -7,7 +7,7 @@ dashedName: step-20
# --description--
Now let's create a third discount strategy for premium users. Create a class named `PremiumUserDiscount` that inherits from `DiscountStrategy`.
For the third discount strategy, create a class named `PremiumUserDiscount` that inherits from `DiscountStrategy`.
Unlike the previous strategies, this one doesn't need an `__init__` method because it doesn't store any configuration. It will apply a fixed 20% discount to all premium users.
@@ -7,7 +7,7 @@ dashedName: step-29
# --description--
Now let's test the complete discount system! Add an `if` statement checking if `__name__ == '__main__'` and move `product = Product('Wireless Mouse', 50.0)` inside it.
It's time to test the complete discount system! Add an `if` statement checking if `__name__ == '__main__'` and move `product = Product('Wireless Mouse', 50.0)` inside it.
After that, inside the `if` block, create a variable `user_tier` and set it to the string `Premium`. Then create a variable `strategies` set to a list of strategies containing `PercentageDiscount(10)`, `FixedAmountDiscount(5)`, and `PremiumUserDiscount()`.