This lesson reuses the long-division state machine from the previous one, but asks only for the repeating block itself. For 8/3 = 2.666… that's "6", and for 50/22 = 2.2727… it's "27".
Run long division, remember the index at which each remainder first appeared, and stop when one comes back. The digits produced since that first appearance are the cycle. If the remainder reaches 0, there is no cycle, so return "".
Reusing a pattern you already built, here remainder → position, is how experienced developers solve new problems fast.