@extends('template') @section('title') Lab 11: Recursion @stop @section('content') # Lab 11: Recursion   {{-- ## [Python Solutions](/content/labs/lab11_recursion/solutions) --}} {{-- ## [Worksheet Solutions](https://docs.google.com/document/d/1tR5-7mCEhw8EBwdqTI21QMREo0zNt-VzVcAUZmPN-ig/edit) --}} ## Summary As usual, we'll work on this week's B notebook today. There are then 3 different options for Thonny activities to try: strings, turtles, and music. @include('/labs/_setup', ['folder' => 'lab11_recursion']) {{-- + Part 0: Non-fruitful warm up + Part 1: Non-fruitful recursive characters + Part 2: Fruitful recursion I + Part 3: Fruitful recursion II + Part 0: Worksheet + Part 1: Recursive Numbers and Characters (non-fruitful) --}} {{-- ## Videos Here is the [youtube playlist with all the videos for this lab](https://www.youtube.com/playlist?list=PLX93PuaDL2dINYN5upQ10hIzk1smO1QqI). You can see the complete video list below, and videos are also embedded in lab web pages. * (1/6) Worksheet Review Section 1 of 3 [](https://youtu.be/iiyGwGfii1I) | [Download](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_1_RecursionWorksheet1.mp4) | [Captions](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_1_RecursionWorksheet1.sbv) * (2/6) Worksheet Review Section 2 of 3 [](https://youtu.be/4m0SQfP8BLU) | [Download](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_2_RecursionWorksheet2.mp4) | [Captions](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_2_RecursionWorksheet2.sbv) * (3/6) Worksheet Review Section 3 of 3 [](https://youtu.be/-r0dqD5qJuc) | [Download](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_3_RecursionWorksheet3.mp4) | [Captions](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_3_RecursionWorksheet3.sbv) * (4/6) Lab Tasks Part 1 asteriskTriangles [](https://youtu.be/PqLRfH1UDEk) | [Download](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_4_RecursionPart1.mp4) | [Captions](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_4_RecursionPart1.sbv) * (5/6) Lab Tasks Part 2 Recursive Turtles Intro [](https://youtu.be/d2jYsQckEDE) | [Download](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_5_RecursionPart2Intro.mp4) | [Captions](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_5_RecursionPart2Intro.sbv) * (6/6) Lab Tasks Part 2: doubleDiagonal [](https://youtu.be/mSJxupNHfbw) | [Download](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_6_RecursionPart2DoubleDiagonal.mp4) | [Captions](https://sakai.wellesley.edu/access/content/group/77109fc3-0650-48b0-aeb4-22c7e2e94cba/Lab%2011%3A%20Recursion/lab11_6_RecursionPart2DoubleDiagonal.sbv) --}} @include('/labs/lab11_recursion/_toc') ## Big Questions {.bigqs} - **How has your understanding of loops and repetitive actions changed since you started this class?**
Show "Answer" There's no right answer here, but we hope that you feel you have a more refined and explicit understanding of how repetitive processes start and stop, and what kinds of patterns they might exhibit. It may not be obvious (which is why we're asking this question), but by thinking a lot about loops, and where they should start and stop, what should happen in each iteration, etc., you are developing a new way to think about certain problems. And we're about to do that again with recursion.
- **What is "wishful thinking?"**
Show Answer Wishful thinking is when you assume that you have already solved a problem before starting to solve it. It's a process of willing suspension of disbelief, just like when you get absorbed in a good story and are willing to excuse inaccuracies or exaggerations for the sake of the plot (except maybe a little less entertaining and a little more deliberate). If used carefully and with precision, it can be helpful in solving recursive problems.
@stop