Impressions of Tracing Recursion (From Week 4)
In week 4, we started tracing recursive functions. It was the first time I've traced recursive functions in Python. I really enjoyed the way Prof. Heap explained recursion and the exercises we did in class were a good learning point. They helped me understand how recursion works and also how to trace them very well. I feel like this will be extremely helpful when we start writing our own recursive functions and go more in depth with them. The lab was also helpful because it gave me a chance to test my ability to trace recursive calls and I feel like with all the practice over the last two weeks, that I am getting good at it. Another wonderful example Prof. Heap used while explaining recursion was using the Turtle module to draw a ternary tree recursively. The drawing surprised a lot of people in the class, including myself but when I looked at the code for the function and read it over a few times, the recursive call started to make sense and I found myself tracing over the steps in my mind which was a good thing.
No comments:
Post a Comment