[sf-lug] [PYCLASS] Session 3: Monday Oct 6

Alex Kleider a_kleider at yahoo.com
Fri Oct 3 10:16:18 PDT 2008



--- On Fri, 10/3/08, jim <jim at well.com> wrote:
 
> 
> # "matrix" means grid of all boxes 
> determine number of boxes in the matrix 
> determine horizontal and vertical dimensions of boxes 
> calculate horizontal line length (box_horizontal *
> num_boxes) 
> 
> at start point, print "+ ' 
> label: 
> build boxes across loop Z times: 
>    build horizontal line loop Y number of times: 
>       print some number X of "- " 
>       print a "+" 
>    at end of line print "\n" 
>    do verticals 
>       print "/ " 
>       build horizontal line loop Y number of times: 
>          print some number X of "  " 
>          print "/ " 
>    at end of line print "\n" 
> goto label N times to make N rows of boxes
> 

My frustrations with this exercise is that we have not yet been exposed to iterative (for, while, etc) constructs so your methodology as I understand it can not work with in the limits of what we've covered so far.
But wait until the next chapter! 
In my humble opinion, we should allow two weeks for completion of exercises for chapter 4. There's a huge amount of work to do there,
but at least the for loop is introduced giving us the tool we so sorely miss in doing the grid exercise this week.
All of this is very time consuming but great fun.



      




More information about the sf-lug mailing list