Programming practice

Python recursion tracing practice

Each question shows you a complete recursive Python function and asks you to trace its return value for a specific input. Pick linear or branching recursion, set the question count, generate a fresh set, and check all your answers at once.

Interactive question set

Read each function carefully. Trace from the initial call down to the base case, then unwind. Enter the final return value for the function call shown in the prompt.

Advertisement