BasicBasics & Math10 points
Wholesale price tiers and free shipping
A stationery wholesaler in Lahore quotes the unit price of a box of pens from the total quantity of the order (the whole order gets the tier price, not just the extra boxes):
- 1 to 9 boxes: 25.00 each
- 10 to 49 boxes: 22.50 each
- 50 to 199 boxes: 20.00 each
- 200 or more boxes: 17.75 each
Shipping is a flat 14.99, but it is free when the items subtotal is at least 500.00.
Task: read one integer, the number of boxes (at least 1). Print one line in the format unit=22.50 items=225.00 shipping=14.99 total=239.99 with every amount shown with 2 decimals.
Sample tests
Input
5
Expected output
unit=25.00 items=125.00 shipping=14.99 total=139.99
Input
25
Expected output
unit=22.50 items=562.50 shipping=0.00 total=562.50
Your answer is also checked against 5 hidden tests.
Python 3
10 pts
Loading editor...
Log in or create a free account to run your code, submit and earn points.
Run your code to see the output here. Ctrl + Enter also runs it.
