← Questions
Shopping cart pricing with category coupons
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A shopping cart holds items, each with a category and a price. A coupon names a category and gives a percentage or amount off, and it applies only when the cart meets its conditions: a minimum number of items and a minimum total price (in that category). Model items, the cart and coupons, and write the function that computes the cart's final price with the coupons applied. Discuss how you would add new coupon rules without rewriting the pricing code, and how several coupons interact.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
