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

Daniel Yoo dyoo@hkn.eecs.berkeley.edu
Tue, 8 May 2001 03:27:05 -0700 (PDT)


> 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.

If they can't do GUI's, let's see if we can write something that lets your
students play around with graphics.  For the CS3 class, the last 2 weeks
of the introductory CS class covers a barrage of topics, including
fractals:

    http://www-inst.EECS.Berkeley.EDU/~cs3/lectures/l23/l23.html

To make this accessible to Scheme students, we provide them with a
simplified interface to a Scheme canvas, using a teachpack for DrScheme:

    http://www-inst.EECS.Berkeley.EDU/~cs3/misc/graphics-teachpack.scm

which allows them to play around with fractal programs without worrying
too much: all they need to really remember is

    (clear-graphics)
    (draw-line)

which still gives them enough power to draw pretty intricate looking
fractals.  I've almost completed a version in Python that works similarly
to the Scheme teachpack.  Give me a day or so.  *grin*


Ideally, a student can do something like:

###
from graphics import *
clearGraphics()
drawLine(0, 0, 100, 0)
drawLine(100, 0, 100, 100)
drawLine(100, 100, 0, 100)
drawLine(0, 100, 0, 0)
###

to get a box drawn on the screen.  And they can write procedures that
generate general boxes, given the upper-left/bottom-right coordinates.  
What I have right now uses Tkinter and almost works --- I just need to
finish some of the implementation details.