[Verba] Computer Club Update

Stuart D. Gathman stuart at gathman.org
Sun Apr 1 21:34:01 EDT 2007


This semester, there has been no lecture.  Our class has mostly younger 
students, and has been entirely hands on.  While learning foundational 
concepts like radix arithmetic, coding, etc, would be the classical 
approach, it seems a shame to drag all the equipment in only to be 
lectured.  The goal this semester is to get the basic idea of writing 
instructions for a machine.

There are three groups.  One group is programming the classic "robots" 
game.  Another is going through the earlier programming tutorial.  The 
third group is hoping to learn Z80 assembler for the TI calculator.

On Mar 28, I compiled and installed the program to copy ROMs and programs 
to and from the TI calculator.  Unfortunately, they forgot the 
calculator.  The robots group got the basic game working.  I added the
function we were looking for.  It was "enumerate".  The loop looks like
this now:

      for i,r in enumerate(objects):
        for s in objects[i+1:]:
          if s.x == r.x and s.y == r.y:
            r.collision(s)

You can download the entire program from:

http://gathman.org/verba/zachary/robots.py

-- 
   	      Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.



More information about the Verba mailing list