Skip to main content

Practice · 5 of 5

Debug: the always-expensive shipment

CHALLENGE
Difficulty: beginner+25 XP

Every customer is charged 12. The intended tiers: prime → 0, items >= 10 → 5, items >= 3 → 8, else 12. Find and fix the condition bugs (order and boundary) in shippingCost.

Back to lesson: Practice: Practice: Decisions