[Edu-sig] Python for Fun
Chris Meyers
cmeyers@guardnet.com
Thu, 24 May 2001 17:40:15 -0800
Hi,
I would like to introduce myself and offer my first posting to the
group. My name is Chris Meyers and I've been working with Jeff
Elkner and his Python class at Yorktown High School on the Open
Book Project.
I'm working primarily on Python case studies for intermediate
students. The first 4 (of hopefully a dozen) can be found at
www.ibiblio.org/cmeyers.
These programs are some of my favorites from many years of
programming. They are all short, just a page or two but should
demonstrate good use of recursion and objects with algorithms that
are a little beyond the ordinary. You will be led to a writeup that
should explain the code in detail. These 1st 4 are
Logic Circuits. Simulation of logic gates with object classes that
make good use of inheritance. This study starts with AND, OR, NOT
gates and builds up to a four-bit binary adder. Several students
are extending this study at Yorktown.
Lisp in Python. A study of the classic evalquote mechanism. We end
up with an interactive lisp similar to interactive python.
Tower of Hanoi. A reworking of the standard algoritm to use objects
sending messages. Includes a classroom exercise where students play
the objects
User Input. An extension of raw_input and input functions to
provide a scripting mechanism. Used by Lisp in Python to load
files.
I've been a programmer for nearly 30 years, and have used a lot of
languages. I work at the daily newspaper in Eugene Oregon, the
Register Guard. I found Python about 5 years ago and tried it on a
text processing project and it worked so well we've never looked
back. Now 8 people program with it daily, and it is absolutely the
language of choice for all new projects. The production of our
internet newspaper is automated with Python code to the extent that
it requires only about 1.5 hours a day for someone to produce. You
can see it at www.registerguard.com. We are converting all of our
old systems on VAX computers to Unix using Python and SQL. 2 years
ago we converted our circulation system from Cobol to a combination
of VB, Python, and SQL. The amount of code was reduced a factor of
six, the system runs well, changes are easy, everyone is happy.
On a personal note, I've really grown to love this language (Thanks
Guido!!) Lots of reasons, but you all know them and I would be just
preaching to the choir.
Assuming we get enough students (and I'm getting a lot of interest)
I'll be teaching a beginning Python class at our community college
this summer. It's short, only 15 hours. But it will be mostly
adults and should be interesting to see how far we get.
Thanks, Chris