In this lesson
- It starts with a question. A function counts down from n by calling itself with n-1. What stops it?
- The idea you will find. Shrink the problem, and stop at the bottom. — Two parts, always: a base case that answers directly, and a step that calls itself on something strictly smaller. Recursion shines where the problem is naturally nested — folders inside folders, a family tree, splitting a list in half again and again.
- Length. 5 short steps. Progress saves on this phone.
Part of Python: Recursion
Solving a problem by solving a smaller copy of it — and always leaving a way out.