All challenges

Tuesday, 15 September 2026

Past

Three rungs, one idea. Solving rung 1 counts. Climb as far as you can.

Packing Into Boxes

division + remainders

Rung 1Daily goal5 points

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

InputOutput
10, 33
0, 50
6, 32
2, 50

There are extra hidden tests, so make it work in general, not just for these.

Rung 2Bonus7 points

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

InputOutput
10, 34
0, 50
6, 32
1, 51

There are extra hidden tests, so make it work in general, not just for these.

Rung 3Bonus10 points

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

InputOutput
[10, 6], 36
[], 30
[0], 50
[1, 1, 1], 53

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.