Last week's material (or two weeks ago, rather) examined some of the basic concepts of recursion, focusing on tracing through various elements and nested lists. I was intrigued by the concept of a function able to call upon itself repeatedly through any level of complexity, and admittedly, skeptical when we were first presented the example sum_list in lecture.
While we have yet had the opportunity to write recursive code in depth ourselves, the tracing exercises in lab have been greatly helpful in better understanding the principles behind recursion, the use of base cases and the way in which it influences the overall output and function. I am still having some difficulty implementing recursive code, but hope to have this down with a bit more practice in the coming week
No comments:
Post a Comment