Recursion is a problem-solving technique in which a function calls itself on a smaller version of the same problem. Instead of writing a loop that repeats work, you describe the problem in terms of itself: a factorial of n is n times the factorial of n-1, the nth Fibonacci number is the sum of the two before it, and so on. Every correct recursive function needs two parts: a base case that stops the chain of calls and returns a direct answer, and a recursive case that moves the input closer to that base case.
This topic matters in EGN3214 because recursion is a natural fit for problems with nested or self-similar structure, and because writing it forces you to think carefully about what a function returns and how parameters change between calls. It also connects to how Python actually runs your code: each call occupies a frame on the call stack, so recursion that never reaches a base case, or that goes too deep, raises a RecursionError rather than running forever.
As you watch, keep three questions in mind for every example: What is the base case? How does the recursive case shrink the input? What would happen if the base case were missing or wrong? It is also worth noting where the videos compare recursion to an iterative loop, since in Python an equivalent loop is often faster and uses less memory even when recursion reads more clearly.
A beginner-oriented walkthrough of recursion in Python that builds up from the basic idea of a function calling itself to coded examples, including a recursive Fibonacci implementation and an iterative version of the same problem. The timestamps indicate it also discusses whether recursion is faster than iteration in Python.
It covers the core subtopics (what recursion is, base case, recursive case) with runnable code, and the recursion-versus-iteration comparison gives you an honest picture of recursion's practical costs.
A tutorial-series episode devoted to recursion in Python, presenting the concept and working through recursive function examples step by step as part of a structured beginner course. Expect standard introductory examples such as factorial or similar self-referential problems, with attention to how the calls unwind.
It offers a second explanation of the same ideas in a different teaching style, which is useful if the first presentation does not click; CodeWithHarry's day-by-day format keeps the focus tightly on the single topic.
A short, focused video on what happens when a recursive function has no base case: Python raises RecursionError: maximum recursion depth exceeded. It explains the call stack behind that error and why Python imposes a depth limit at all.
This directly addresses the recursion depth and limitations subtopic, which the broader introductory videos treat only briefly, and it teaches you to read and diagnose an error message you will almost certainly produce yourself.
Together these videos support MO3 most directly: the first two show how to identify and code a base case and a recursive case for concrete problems like factorial and Fibonacci, while the third shows what goes wrong when the base case is missing or unreachable. Because recursive functions are still ordinary functions, the examples also reinforce MO1 by exercising def, parameters, and explicit return statements, and tracing the sequence of calls and their local variables reinforces the scope reasoning in MO2. The recursion-versus-iteration discussion additionally builds the habit of judgment behind MO5 — choosing an approach based on readability and practical constraints rather than novelty.
These videos were chosen from YouTube on October 2, 2026. Each has captions; the player turns them on. Videos on YouTube can be changed or removed — if one no longer plays, tell your instructor. If a player does not appear, use its Watch on YouTube link.