Inside

In this short hands-on lesson, you will explore recursion by moving through nested patterns, naming the parts that make recursion work, building a recursive function in Python, watching it run, and checking what you learned.

By the end, you will be able to:

  • Explain what recursion is, in plain language.
  • Spot the two parts every recursion needs: a base case and a recursive case.
  • Write and trace a simple recursive function in Python.
  • Describe the call stack, and why a base case is required.
  • Predict what happens when the base case is missing.

An interactive lesson by Chalece DeLaCoudray