Before you can read the parent note, you need to own every piece of notation it throws at you. This page starts from absolute zero and builds each symbol on the one before it. Nothing is used before it is drawn.
The figure shows the fork every recursive function contains: a question at the top ("is the input tiny?"), a stop-and-answer branch (base case), and a shrink-and-call-again branch (recursive case).
Each foundation feeds the next: a function that can return and call itself, plus a way to make the input smaller (n-1, L[1:]), plus a known stopping value (base case), all managed by the call stack.
Test yourself — cover the right side and answer before revealing.
What does return do inside a function?
Hands one value back to the caller and immediately stops that function.
If a function has no return, what value comes out?
None (the empty "nothing" value).
What is a "call"?
Actually running a function with a specific input.
What does n - 1 guarantee in a recursive call?
The input gets one step smaller, so the recursion moves toward its stopping point.
For the list [4, 2, 7], what is L[0] and what is L[1:]?
L[0] is 4 (the head); L[1:] is [2, 7] (the rest/tail).
What does n! mean, and what is 0!?
The product 1·2·3···n; and 0! is defined as 1.
State the self-similar rule for factorial.
n! = n · (n-1)!.
What is a base case?
The smallest input whose answer is known directly, with no further recursive call — it stops the recursion.
What is a recursive case?
The branch that calls the function on a smaller input and combines that result.
What is a stack frame, and do two calls share n?
A private notepad for one call holding its own locals; no, each call has its own independent n.
What does LIFO mean for the call stack?
Last In, First Out — the most recently pushed (deepest) frame finishes and pops first.
What error appears when there is no working base case?
RecursionError: maximum recursion depth exceeded.
Ready? Head back to the parent: the main note builds fact and traces the stack using exactly these pieces. Prefer loops instead? Compare with Iteration — for and while loops.