Today I taught the first part of chapter 7, which focused on introducing iteration and recursion through evaluating palindromes. I essentially used the monitor to type my code for the three different methods on the screen. The python web browser we originally used appeared to be for python 3, so my code did not properly run, but I was still able to take my participants through the mechanics of creating the functions. I introduced the first method, which creates a copy of the word, reverses it, and compares it to the original. I introduced iteration, which compares the first letter to the last, second letter to second to last, etc. Finally I introduced recursion, in which the function calls itself to complete a task. I also went over some of the costs and benefits of each method. For example, the first method looks neat and clean, but could hog up memory by having to create a copy. In contrast, iteration creates a longer method, but resolves the memory issue. My main self-criticism is that I only have a more general understanding of recursion as a principle and I was not able to fully explain each individual component of the recursion method. But my hope is that my examples were able to provide my participants with a solid overview of iteration and recursion as problem-solving methods and coding tools. The following are screenshots of my version of the three functions, which I retyped and displayed during the lesson.
Warning: Attempt to read property "comment_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 71
Warning: Attempt to read property "comment_author_email" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 591
Warning: Attempt to read property "comment_post_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 592
Warning: Attempt to read property "comment_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 71
Warning: Attempt to read property "comment_author_email" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 591
Warning: Attempt to read property "comment_post_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 592
Warning: Attempt to read property "comment_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 71
Warning: Attempt to read property "comment_author_email" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 591
Warning: Attempt to read property "comment_post_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 592
Warning: Attempt to read property "comment_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 71
Warning: Attempt to read property "comment_author_email" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 591
Warning: Attempt to read property "comment_post_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 592
Warning: Attempt to read property "comment_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 71
Warning: Attempt to read property "comment_author_email" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 591
Warning: Attempt to read property "comment_post_ID" on null in /home/annarink/public_html/digitalstudies/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 592