= Solution
With its default argument and a nonnegative <integer> input, it prints the decimal <digits> of $n$ in order, one per line. For example, `mystery4(407)` prints \b[`4`, then `0`, then `7`]. <Integer division> removes the final <digit>, <recursion> handles the preceding <digits>, and the <remainder> gives the final <digit>. The function returns `None`.
There is a subtlety for a nondefault base: the recursive call omits `m`, so it resets to $10$. For $m\ge2$ and $n\ge m$, the actual output is the decimal <digits> of $\lfloor n/m\rfloor$, followed by the <remainder> $n\bmod m$. For example, `mystery4(13, 2)` prints \b[`6`, then `1`], rather than the binary <digits> of $13$. Passing `m` on to the recursive call would give a consistent base-$m$ <positional notation>. The interpretation as <digits> assumes $n\ge0$ and $m\ge2$; arbitrary <integer> arguments need not satisfy those conditions.
Back to article page