[Edu-sig] Intro and question: assignments/projects for year end

Seth David Schoen schoen@loyalty.org
Tue, 8 May 2001 00:29:17 -0700


Sheila King writes:

> Hello,
> 
> My name is Sheila King. I'm a high school AP Computer Science teacher. Heh. AP
> Exam is tomorrow! I've been learning Python for myself since January. If you
> read comp.lang.python or the Python Tutor List, you've seen my posts there,
> probably.
> 
> Anyway, for the last two or so weeks of the school year, what I'm going to have
> my AP Comp Sci students do is this:
> They get a choice of two possible types of projects:
> (1) CMU graphics. (this is what all of my students did last year.)
> (2) Learn Python.
> 
> I must've given a pretty convincing speech about Python, because 10 of my 17
> students picked to do Python. I was surprised. I thought most of them would want
> to do a graphics project. (Last year's class wrote a number of different games.)
> 
> Anyhow...here's my question:
> I'm looking for suggested projects or programming problems for my students.
> 
> They have had a year of C++, and some of them are excellent. Some are only
> barely proficient. I know the good ones will pick up Python easily. I hope the
> others will be able to do so, as well. It's going to be sort of independent
> study. (I'm putting several HTML tutorials on their desktops...)
> 
> If they only have about two weeks to "learn" Python, and write a small program
> or two, what types of things could I have them do? We won't have time to get
> into GUIs. These can't be very ambitious projects, due to the limited amount of
> time.

How much did they understand OO from C++?  Some of the neat things
Kirby Urner has come up with here really show off the power of objects
and state -- and there are lots of possibilities for "create an object
which models the behavior of..." (something from mathematics or
language or everyday experience).

_Structure and Interpretation of Computer Programs_ has some great
exercises and projects -- they are oriented toward Scheme, but some of
them transfer well.  Python has plenty of high-level data types and
procedures.

A friend of mine wrote a program which uses a phonetic dictionary to
find haiku which happen to appear in regular prose text -- for
example, in a speech by Richard Stallman,

	One person gains one
	dollar by destroying two
	dollars' worth of wealth.

Writing parsers and interpreters can be interesting.  _SICP_ spends a
lot of time on this, partly to reinforce the idea that interpreters
and compilers are "just" computer programs.  You could do a "how would
you design a computer language?" or "how would you design a program
which could interpret this toy language?".

Symbolic algebra -- parse expressions into trees, try to find ways to
manipulate them (simplify, factor, expand, evaluate, add, subtract,
or multiply them; do symbolic differentiation if students know what it
is).

Give a specification for a Turing machine and have students write a
simulator for it.  Then have them see if they can write some simple
Turing machine programs.  (They don't have to prove universality, or
equivalence to other computing models, or that there are
non-computable numbers -- although it could be nice to talk about
this, because many high school classes spend more time on "how to
compute particular things" than "what can be computed".)

Given urllib, write a web browser (text only).

Conway's Game of Life.

Core War.

A stack-based calculator -- push, pop, operations.  You could then
also talk about, or have students talk about, RPN.  Can they see how
to convert between RPN and infix?  Why RPN doesn't need parentheses?

Compress images (given in the form of arrays, like a list of lists
of integers) or text (given in the form of a string, or a file that
you open and then read the contents of).  Maybe students can discuss
how they would handle compression and see who can come up with the
most effective techniques.  (In junior high school I re-discovered
run-length encoding, but I never would have figured out Huffman coding
or LZW or anything like that.)  You could have a contest to see who
could come up with the most efficient lossless compressor.  (I know it
wouldn't be very good compared to gzip, but it would still be
interesting to see what ideas occur to students, and whether they can
correctly implement _some_ original lossless compressor and its
corresponding decompressor.)

Some of those may be very ambitious; it depends on your students.  I
hope they're at least interesting.

-- 
Seth David Schoen <schoen@loyalty.org>  | And do not say, I will study when I
Temp.  http://www.loyalty.org/~schoen/  | have leisure; for perhaps you will
down:  http://www.loyalty.org/   (CAF)  | not have leisure.  -- Pirke Avot 2:5