Lecture 20: Introduction to Recursion

(This material is also the basis for Lecture 21: More Recursion; Recursive Turtles)


A PDF file of the lecture slides handout.


Think Python, Chapter 5.8-5.10: Recursion


Click on the lec_introrecursion.zip link to download the .zip file to your computer. The unzipped folder contains the notebook for lecture activities.


There are three videos for this lecture: a high-level overview, a walkthrough for the countDown function, and a walkthrough for the drawTarget function. We recommend that you watch at least the high-level overview, and given the intricate nature of our topic, it's probably useful to watch all three.

Here's a Youtube Playlist with all three videos in it. In the YouTube description for each video you can find an outline of the video with links to different segments within the video, which should be useful if you're looking for the part where a particular function or concept is discussed.

For the captions links below, you may have to right-click and "save-as;" if you put the .sbv file in the same directory as the .mp4 video file most video players should be able to load the captions automatically.


Solutions for the notebook (HTML File)

Download the solutions as a notebook