Tuesday, 15 September 2026
PastThree rungs, one idea. Solving rung 1 counts. Climb as far as you can.
Packing Into Boxes
division + remainders
How many boxes get filled
Write a function called full_boxes
A box holds exactly box_size items, and box_size is always 1 or more. Return how many boxes you can fill completely from items items. With 10 items and boxes of 3 you fill 3 boxes and 1 item is left over, so the answer is 3.
Examples
| Input | Output |
|---|---|
| 10, 3 | 3 |
| 0, 5 | 0 |
| 6, 3 | 2 |
| 2, 5 | 0 |
There are extra hidden tests, so make it work in general, not just for these.
Nothing left behind
Write a function called boxes_needed
Now every item has to go in a box, so a box that is only part full still counts. With 10 items and boxes of 3 you need 4 boxes. With 0 items you need 0 boxes.
Examples
| Input | Output |
|---|---|
| 10, 3 | 4 |
| 0, 5 | 0 |
| 6, 3 | 2 |
| 1, 5 | 1 |
There are extra hidden tests, so make it work in general, not just for these.
A whole day of orders
Write a function called total_boxes
You get a list of orders, each one a number of items, and every order is packed in its own boxes — an order never shares a box with another order. Return the total number of boxes needed for the whole list. An empty list needs 0 boxes.
Examples
| Input | Output |
|---|---|
| [10, 6], 3 | 6 |
| [], 3 | 0 |
| [0], 5 | 0 |
| [1, 1, 1], 5 | 3 |
There are extra hidden tests, so make it work in general, not just for these.
Finish Rung 1 and today counts. Rungs 2 and 3 are there if you want to push further.