question 30 Operators & Expressions · hard
Checkout summary
Build the summary a checkout shows. The subtotal is qty items at price. The discount is discount_percent percent of the subtotal. The total is the subtotal minus the discount, plus shipping. Finally, say whether the subtotal reached 50, which earns free shipping next time.
First lines
qty = 3, price = 20, discount_percent = 10, shipping = 4. Check runs your program again with other cartsPrints
Subtotal: 60, Discount: 6.0, Total: 58.0, Free shipping next time: TrueExpected output4 lines
- 1Subtotal: 60
- 2Discount: 6.0
- 3Total: 58.0
- 4Free shipping next time: True