[Edu-sig] Beginner programs?

Ryan Booz ryanbooz@alumni.psu.edu
Wed, 07 Feb 2001 12:42:02 -0500


Kirby,

Thanks for the comments.  I really appreciate it.  Just for
clarification...

> I think the calculator program is useful for teaching
> syntax and programming concepts...

This was purely my intent.  We've done plenty with using the
mathematical abilities of the language so far.  I'm just "thinking off
the top of my head" about programs they will understand and we can sit
and come up with logical approaches to coding them

> Most the calculator demos w/ Python are really about teaching
> the Tkinter API -- how to do a graphical/GUI interface,
> but that's not what you're doing here.
>

Actually, my thought was eventually to take this and head that
direction.  It will be a while before we get to Tk, but that's one of
the goals.

> Anyway, I just hope your students don't get the idea
> that they have to program a calculator in order to get
> the benefits of a calculator in Python.  No doubt you
> make this clear.
>

Understood.  I think I have been.  But point well taken.

> Simple series and sequences are not college level math.
> Taking averages, summing 2nd powers or consecutive
> integers -- that's middle school content.  Writing a
> Fraction class to handle fractions in p/q format (as
> tuples) is another fun little project (duplicates a
> feature many calculators _do_ have, but which Python
> doesn't, unless you program it that way (many modules
> out there)).  I've got one too:
> http://www.inetarena.com/~pdx4d/ocn/python/functions.html#Fraction
>
> I think when it comes to teaching Python, you need to
> have some source code that already does some fairly
> interesting stuff which you then dissect, i.e. students
> learn to read working source and understand what it's
> doing before they try to tackle coding a program of
> similar complexity ab initio.  Reading well-written code
> and understanding why it works is an important aspect of
> learning to program.

I guess that's kind of where I'm going with my original question.  I've
found a lot of examples, but they usually have many other "things"
involved in them that we just haven't gotten too in class.  Even things
that seem to be "simple" programs.  I guess I just need to keep coming
up with ideas of problems to solve that will fit the knowledge we have
at any given point and then present them to the class for discussion.
Thanks again.

Ryan