Lab 11: Recursion
Please click on this document for the Wednesday, 12/1 lab zoom link
Worksheet Solutions
Python Solutions
Summary
- Part 0: Worksheet
- Part 1: Recursive Numbers and Characters (non-fruitful)
- Part 2: Recursive Turtles (non-fruitful) OR
- Part 3: Recursive Drums (non-fruitful)
Lab Setup
- Find your partner
- Use CyberDuck to SFTP into your account on the
cs.wellesley.edu
server - On the server, navigate to the
cs111/download
folder - Download the
lab11
folder to your Desktop (drag and drop it from the CyberDuck window) - Open Thonny and view the relevant
lab11
files
Table of Contents
- Lab 11 Home
- Tips: Thinking about recursive problems...
- Part 0: Warm-up
- Part 1: Recursive Characters
- Part 2A: Recursive Turtles (work on this part OR the next one)
- Part 2B: Recursive Drums (work on this part OR the previous one)
- Knowledge Check
Big Questions
- 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.