Intro to
Programming
with Python

Fall 2011
course
navigation

nov 10

Continue random walk exercise from last time.
Discus inheritance ideas; see attached.

in class

Look at the random walk problem as a class exercise
We finished random_walk_2 (1D) and random_walk_3 (2D) from chapter 9.
We got most of the way through an object oriented version random_walk_3 (including a Cell object that was a bit of overkill, since here it essentially just stores an integer). I emphasized incremental changes with interactive tests as we go.
All three versions are attached.
http://cs.marlboro.edu/ courses/ fall2011/python/ notes/ nov_10
last modified Thursday November 10 2011 11:24 am EST

attachments [paper clip]

     name last modified size
   random_walk_2.py Nov 10 2011 11:23 am 1.26kB    random_walk_3.py Nov 10 2011 11:23 am 1.34kB    random_walk_4.py Nov 10 2011 11:24 am 1.59kB    zoo.py Nov 10 2011 1:28 am 2.47kB