Exercise: Lost Chunk
chunks splits a list into groups of size, for example to send records to an
API in batches. The last group may be shorter.
It looks right, and it works on some inputs. But a user reports that some records never get sent. The tests in this exercise are correct. The function has one small bug.
Debug it the way you would at work. Run the program and compare the output
with what you expect. Which inputs lose items? What do they have in common?
Then look at the range call and work out what each value is on a small input.
Exercise: fix the bug in chunks so every item ends up in exactly one
group, in order. Change as little as you can. Press Check to run the tests.
The Debugging challenges are full of bugs like this one.