Save this video free

Python (Fall 2026) Module 13-3: Recursion in Practice

Bill Moseley, Ph.D. - Computer Science Educator · 10:13 · Watch on YouTube

Python (Fall 2026) Module 13-3: Recursion in Practice Watch on YouTube →

Overview

Bill Moseley connects recursion to self-similar fractals, including the Mandelbrot set, Sierpiński triangle, and a Python turtle dragon curve, then explains its practical use for traversing nested lists. The central technique is to process each list item by counting single items and recursively calling the same function for sublists, allowing programs to handle structures whose depth is unknown.

Key takeaways

Chapters

0:00 Python Turtle Fractals: Mandelbrot, Sierpiński, and Dragon Curve
2:53 Why Recursion Fits Nested Lists and Tree Structures
8:24 Designing a Recursive processList Function

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 Now, recursion is used for all kinds of  interesting things. Here are some other recursive fractals that are kind of interesting to see. This  is called a Mandelbrot set. I know it's kind of dim here, but it was drawn using the turtle. So,  it's plotting these dots in a specific pattern. And if this continues, it would actually go to the  next level of size. Another interesting one is a Sierpinski triangle. You don't have to remember  these. Won't be on the test, cuz there is no test. But, this is a triangle made up of triangles made  up of triangles made up of triangles. What's that?

0:55 It, it is not the Triforce. I'm not  teaching class on The Legend of Zelda. I kind of wish I could, but no. But maybe that was  the inspiration for the Triforce. I don't know. But this is, this is the Sierpinski triangle. And  you'll notice it, a lot of these fractal designs are something made up of something made up of  something, and, and the something is the same. So, you're seeing that pattern of smaller versions of  the same thing being presented over and over. Now, this happens to be one of my favorite fractal  designs. It's called the dragon curve, and it is a simpler version of that first fractal  that I showed you, but done using the Python, done using the Python's turtle. Man, I'm  just going to make it dark for 1 second so

1:51 you can see this a little bit better, cuz it  really is kind of a cool design. There we go. So, and I like this particular version because  I've told it to gradually change color. But, you can start to see, they, the, even though  it's sort of a low-resolution version of itself,

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Bill Moseley, Ph.D. - Computer Science Educator.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.