Hướng dẫn thử thách
1 / 31
Step 1
In this workshop, you are going to build a discount calculator that can apply different discount strategies to products. The system will determine the best price for a customer based on multiple discount rules.
Start by defining a class named `Product`. Give your class an `__init__` method with the following parameters: `self`, `name`, and `price`. Inside the `__init__` method, assign `name` and `price` parameters to instance attributes with the same name.
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.py
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵