[Edu-sig] Fwd: python for math

kirby urner kirby.urner at gmail.com
Mon Mar 1 17:51:09 CET 2010

I hope Mark (not his real name) joins us on edu-sig.  As you will see
below, I'm encouraging him to do so, at which point he might reveal
his true identity.

He teaches AP Calculus and has been experimenting with using Python to
abet student understanding, with mixed results.


---------- Forwarded message ----------
From: kirby urner <kirby.urner at gmail.com>
Date: Mon, Mar 1, 2010 at 8:47 AM
Subject: Re: python for math
To: mark

Hi [ Mark ] --

I'm not proposing to replace traditional math notation with Python's,
only to have a computer language expressing these same concepts
without too much clutter.

For example, you might implement a simple Polynomial type in
just a few lines of code (pre-written) and have methods for objects
of this type to (a) produce roots (b) multiply together (c) add

You then have the ability to discuss polynomials as "objects" that
add and multiply, like number types.

Here's a clear essay about the approach:


To put it simply:  I favor introducing "dot notation" (common to many
computer languages) as just another math notation.


I'm into spatial geometry a lot, as I think the bigger / sharper screens
(beyond calculator screens) should have lots of Z-axis, i.e. the
depth dimension needs to be there.

Just transferring a lot of flat stuff, not going spatial, is too much of
a psychological let down, given what students already know computers
can do.

I have a simple non-Euclidean geometry I like to get into (simple in the
sense of easy definitions), but that doesn't preclude doing all the usual
stuff, including with XYZ vectors (another type of math object, easily
expressed in Python, and easily rendered to screen using VPython).

FYI here's an interesting text book some of us are using:

This is not a full blown "math objects" approach.  In fact, there's
no real object oriented programming except on page 88-89 (2nd
edition).  For the most part, it's just using Python in place of a
scientific calculator, in hopes of keeping up with the rest of the
world, which is moving in the same direction.

That's what I'd tell parents:  in the real world, computers and
computer programming (including in Mathematica) have far more
currency than scientific calculators.  Used wisely, computer
technology, including with some programming, is likely to
open more doors, give a better sense of more career options,
provide a stronger orientation.

Understanding more about computers and their connection to
math is vital to a "how things work" approach, which emphasizes
explanations of such basic topics as tabulation of data, these
days accomplished with SQL.  Some mention of SQL, even some
use of it (sqlite?), is completely apropos in Computational Math,
but maybe not in an AP calculus course.

Thanks for conversing on this topic.  I encourage you to join edu-sig,
where lots of educators are pondering these very issues.  We've
had recent threads on Sage etc., and are currently discussing the
interface between math and computer science, at the secondary
school level especially.  See the edu-sig page at Python.org for
more info.



On Mon, Mar 1, 2010 at 7:52 AM,  <mark> wrote:
> On Sun, Feb 28, 2010 at 09:44:25PM -0800, kirby urner wrote:
>> Keep in mind that a reading knowledge of a language is far easier
>> to acquire than a "write from scratch on a blank canvas" mode.  If
>> the lesson plan involves eyeballing already written code, making
>> minor tweaks, this is probably going to yield greater results and/or
>> student satisfaction than sitting them down in front of a white screen
>> and saying 'write something that integrates a polynomial'.
> You may be onto something here.  Are you saying you'd prefer ALL math concepts
> be introduced in Python code?  That may have benefits.  One potential way you
> could defend that is that you can't be unambiguous in Python.  You *can* with
> classical math notation.  For example, does sin^(-1)(x) mean the "reciprocal
> of the sine function" or the "Arcsin (inverse) function"?
> There is a physics book that attempts to do
> something similar with Scheme.  It is called "Structure And Interpretation of
> Classical Mechanics".
> An innovative curriculum that introduces everything in Python code with objects
> may speed learning.  If parents ask "why better?", I can say it is unambiguous
> compared to classical math notation.
> Thanks a 10^6.
> [ Mark ]

More information about the Edu-sig mailing list