
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

I/O and examples
Stacks Activation Stack implementation of Function Calls Illustrate on the Board using Roots of a Quadratic Canonical problem: factorial o Define the factorial o Identify 3 parts of recursion: Clone the function Terminating condition Move towards termination o Write the code o Run with the Debugger for simple case Wrapper functions for setup – negative or fractional numbers? Local functions Graphical Root Finding Palindromes Fibonacci Mutual recursion Tail recursion (?)
Overall, we need to have covered these topics: Basic recursion – factorial – how it works, and why – activation stack etc. Wrapper functions – preparing the data and checking for errors Tree recursion – Fibonacci – a bad idea computationally Perhaps Palindromes or other examples Not tail recursion or mutual recursion
There is an intercepts script to start the discussion if you want 2-D plotting – line color, symbols, titles, etc. [rotate to see the 3-D effect] Parametric curves – circle, random walk plot3(…) meshgrid, surf, mesh shading, lighting