runtime
30 / 500
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 linesqty = 3, price = 20, discount_percent = 10, shipping = 4. Check runs your program again with other carts
PrintsSubtotal: 60, Discount: 6.0, Total: 58.0, Free shipping next time: True
Expected output4 lines
  1. 1Subtotal: 60
  2. 2Discount: 6.0
  3. 3Total: 58.0
  4. 4Free shipping next time: True

Loading your progress…

Checkout summary — Python practice · Runtime