An Intro to
Programming
with Python

Fall 2006
course
navigation

nov 17

We talked about recursion, and the material in the algorithms chapter.
I showed the Turtle() object in turtle.py, and used it to draw a fractal snowflake 'Koch curve'.
The code is in the turtle graphics folder.
In class we wrote a 'recursive counting' example, and saw that it hit a recursion limit at 1000. See the 'in_class.py' attachment.
And we also wrote a recursive procedure to solve the towers of hanoi puzzle, and noticed that the pattern of output looks like binary counting. Again, see tha attachment.
http://cs.marlboro.edu/ courses/ fall2006/python/ notes/ nov_17
last modified Wednesday November 15 2006 12:43 pm EST

attachments [paper clip]

     name last modified size
   hanoi.py Nov 15 2006 11:31 am 6.93kB    in_class.py Nov 15 2006 11:30 am 331B