Python Reading
- Read Recursion from the section entitled Visualizing Recursion through the section entitled Serpienski Triangle.
Class Activity
- Understand how the following Serpienski Triangle solution works.
Serpienski.py
- Which of the functions is recursive? Explain.
- Why does the recursion eventually stop?
- How many total times is the Serpienski function called? Explain.
Active Learning Activity
- What happens if the first two calls to Serpienski in the Serpienski
function are commented out? Explain.
- Modify the solution so that the largest triangle fills up the
screen as completely as possible.
- Modify the solution to choose colors from the colormap randomly.