[IAEP] [Edu-sig] Python and pre-algebra

mokurai at earthtreasury.org mokurai at earthtreasury.org
Fri Jul 1 23:33:21 EDT 2011

On Fri, July 1, 2011 9:43 am, mary.dooms at comcast.net wrote:
> Thank you to everyone who has responded to my inquiry. I truly appreciate
> your willingness to help.
> Our math curriculum addresses the Illinois state standards, however within
> the next 3 years we will be moving to the Common Core.
> A breakdown of the curriculum is below :
> Advanced math (1 section) supported by McDougal-Littel Course 2 textbook
> http://www.classzone.com/cz/books/msmath_2_na/book_home.htm?state=IL
> Integers (order of operations)

I take it that they mean function precedence, with multiplications done
before additions and subtractions. Students can write programs to tell the
computer how to evaluate expressions.

> Fractions/Decimals/Percents
> Algebra (1 and 2 step equations,

I don't know this terminology.

> simplifying, distributive property,
> inequalities)
> Geometry (polygons, angles, surface area, volume)
> Ratios and Proportions

None of the above present problems for using Python.

> Probability

There are two tricky ideas here. The first is equiprobability. Suppose you
have two cards, red on one side and black on the other. How many ways can
they land if you toss them all at once?

All black
1 black, 1 red
All red

Are these cases equally probable? No. (Try it.) What are the equally
probable cases?

The second, conditional probability, takes that thought further. Suppose
you toss one card first, and it comes up red. What are the cases and
probabilities for tossing the second card? This is easy, and nobody should
have real trouble with it.

Now suppose you are a contestant on Let's Make a Deal, and you have to
choose among three doors, one with the grand prize, and two with nothing
or useless prizes. You pick one, but don't get to open it. Then the host
opens a different door that does not have the grand prize behind it.
Should you stick with the door you first chose, or switch to the other
one? This simple problem, which has a simple method of solution, has
caused huge arguments among supposedly bright adults, many of whom get it
flatly wrong.

There are many other simple problems that most people get wrong, but that
is a topic for another time.

> Standard Math (3 sections) Supported by McDougal-Littel Course 1 textbook
> http://www.classzone.com/cz/books/msmath_1_na/book_home.htm?state=IL
> Problem Solving Strategies

There are several useful approaches. In the long run, nothing beats
practice on a wide range of problems and puzzles.

> Fraction operations
> Decimal operations
> Geometry
> Number Sense (Prime factorization, GCF, LCM, Divisibility Rules)

All readily programmed in Python.

Thank you. Some of us will check them out. All of these except the problem
solving strategies are within the range of elementary Python programming.
Programming and debugging are excellent ways to teach problem solving
strategies hands on.

Which topics have your students had the greatest difficulties with?

We need to make a list of topics and subtopics to Pythonize, then a list
of Python features required to do that, then a sequence of lessons and
challenges to teach all of that Python and math together. Simple functions
and expressions, elementary program logic (branch and loop), and very
simple graphics commands will cover most of it. We can discuss the use of
data arrays and more advanced vector and matrix math for solving
simultaneous equations.

OT: I would like to see a larger unit on algebraic rules, not just the
distributive law, emphasizing that different systems obey different sets
of rules, and that certain sets of rules, or axioms, come up over and over
again, and are worth understanding. However, that is called Modern
Algebra, and anything Modern is nearly verboten in schools. ^_^

The result is that we are not permitted to explain that clock time is an
algebraic ring, and to talk about other rings; nor can we talk about
arithmetic on remainders, modulo some number N, as generating rings when N
is composite and fields when N is prime. Not Boolean algebra unless we are
specifically teaching computers; not vector spaces and their linear
transformations, a concept that is trivial visually, and that makes
trigonometry trivial to explain. We do not talk of groups of symmetries or
permutations. We cannot even mention that each of these sets of rules, and
many others, defines a category. Especially we cannot explain how to add
apples and oranges in a graded ring of Laurent polynomials, even though we
expect children to add 2x and 3y without explanation. You can look up
graded rings and Laurent polynomials, but the point is that these are just
names for the stuff of algebra itself, where you can use an arbitrary
number of variables to make expressions by adding, subtracting, and
multiplying, and sometimes, but not always, you can divide.

And it's OK to use negative numbers, but not complex numbers or hyperreal
numbers, (including infinitesimals and infinities), which have endless
applications to topics that interest children, such as secret codes and
games, and become essential later on in calculus, physics, and other

> Our district is generally supportive to adding new software to the school
> computers, however requests are only honored during school breaks (winter,
> spring, summer) as they want to keep the computers available for student
> use and MAPS testing. (http://www.nwea.org/) :-(

Do you mean that new software can be put on during the breaks only to be
removed at the beginning of the next term, or that it can be installed and
left there for future use?

What software do you have now? Windows, Mac OS, or Linux? Commercial
programming language products or Free Software?

It appears that this might be a good case for Sugar on a Stick, a bootable
USB drive, so that nothing is installed on the computer. This also means
that each student who has one can carry any work done from one computer to

> My plan is to begin with my advanced math students.
> On a side note, I have enjoyed reading the personal stories you have been
> sharing. Mine is that my first job out of college was working for the now
> defunct Teletype Corporation, a part of the now defunct Western Electric,
> a part of the now defunct Bell System, a part of the perhaps soon to be
> defunct AT&T?!

Great pioneers in the computer industry, all, whose management thought
that they understood the computer business better than the companies that
dominated it. :(

> I spent ten years in public relations,

That could be helpful later on, when we try to sell our program to other
teachers and to administrations.

> took time off to
> raise children, then returned to the workforce to teach middle school.
> Again, I appreciate your support, and I look forward to collaborating with
> you.


> ----- Original Message -----
> From: mokurai at earthtreasury.org
> To: "kirby urner" <kirby.urner at gmail.com>
> Cc: edu-sig at python.org
> Sent: Friday, July 1, 2011 1:32:45 AM
> Subject: Re: [Edu-sig] Python and pre-algebra
> On Fri, July 1, 2011 1:41 am, kirby urner wrote:
>> On Thu, Jun 30, 2011 at 8:03 PM, <mokurai at earthtreasury.org> wrote:
>>> On Wed, June 29, 2011 7:15 pm, mary.dooms at comcast.net wrote:
>>> >
>>> > I teach 6th grade math and Python was suggested as a way to apply
>>> > pre-algebra concepts in a programming context. My programming
>>> background
>>> > consists of one C++ programming class. How do I begin?
>>> Python is one of several excellent options. Others are Logo, Smalltalk,
>>> and APL, all of which are available at no cost. I worked on a free APL
>>> for
>>> 8-bit computers before the Free Software movement got started, and I
>>> have
>>> friends working on APLs for current computers to put under the GPL.
>> APL was my first love at Princeton, back when most people (including
>> me) had to use punch cards.
> You and jazz guitarist Stanley Jordan. He wants to create an APL-based
> computer music education program.
> At Yale in 1963 we only had octal and FORTRAN. Later on, Yale hired Alan
> Perlis away from Carnegie-Mellon to be Chairman of the Computer Science
> Department. He made APL the first language for all CS students.
>> It was the interactivity I loved, among
>> other aspects. Logo the same way. Grew into dBase later, always
>> interactive, a dialog. Languages divide into those which respond,
>> conversationally, and those which must be looked at as
>> non-conversational.
>> Python joined the ranks of the conversationals.
> LISP was the first. On the other hand, Waterloo University in Canada
> created a FORTRAN interpreter for use in classes, to go with its APL,
> Pascal, and others.
>>> Assuming that your students know no Python, you could use the Sugar
>>> Labs
>>> Turtle Art approach to math and programming to get started. Turtle Art
>>> was
>>> designed for children to use for math, programming, and art, and has
>>> natural ways to move to Logo, Python, or Etoys/Smalltalk. FORTH, too,
>>> but
>>> most people don't want to know that. ^_^ (FORTH love if honk then)
>> I was a math teacher in a day school for humans of the female
>> persuasion, as one of the trusted male faculty (most were not male),
>> but this was long before the Free Software movement (GNU / GPL),
>> was still at the start of the first computer revolution. No Internet
>> yet, at least not for ordinary civilians like me.
> My father was using timesharing, and allowed me on at 300 bps.
>> I dreamed of hypertext (read Computer Lib / Dream Machines
>> by Ted Nelson)
> I met Ted when he gave an invited speech at the APL91 Conference at
> Stanford.
>> and joined IGC with a guest account at New
>> Jersey Institute of Technology. Proto-internet, pre-listserv. In
>> the meantime, snailmailers were proto-typing listservs via
>> Action Linkage. Anyone remember? You'd mail your post to
>> the anchor, who'd photocopy the lot and mail back out to
>> subscribers. The whole listserv phenomenon, happening
>> through snailmail.
> Pierre de Fermat operated as listserv for all of the top mathematicians of
> Europe before the journals got started.
>> Lots of ethnography as yet unwritten.
>> Mid 1980s.
>> 'A Network Nation' by Turoff and Starr Roxanne Hiltz.
>> http://web.njit.edu/~turoff/Vita/vita2005.html#a30
>> I lived behind Loew's Theater on Journal Square, the main
>> PATH station in Jersey City. By 1985, I was back in Portland,
>> having been raised there through 2nd grade.
>>> The question is, which pre-algebra concepts? Do you have a curriculum
>>> standard or a particular textbook in mind? Are there other topics of
>>> interest?
>>> I can write TA or mixed TA/Python examples, and show students how to do
>>> the same, and we could work together on lesson plans to share in the
>>> Sugar
>>> Labs Replacing Textbooks program. There are others with an interest in
>>> doing this.
>> Then I worked at McGraw-Hill (after some stuff in between), 28th floor,
>> Rockefeller Center, Manhattan, editing textbooks, testing educational
>> computer games, contributing curriculum writing (Logo, BASIC).
> We need you to do that again as we find out what children can learn with
> computer aid at earlier stages of development than we thought.
>> Back then, we thought computers were soon to take the math teaching
>> world by storm. Little did we suspect that the North Americans would be
>> conquered by Texas Instruments, leaving the innovation vista to
>> other cultures and/or subversive counter-cultures still operational
>> in some areas.
> Thousands of dollars for a computer, under $100 for a calculator. No
> contest. HP was content with the engineering market and didn't want to
> challenge TI to a retail war.
>> OLPC (One Laptop per Child) was one attempt to break the TI lock
>> on teacher imaginations. For the most part, it failed in North America.
>> The resistance was too great. No breakfast cereal boxes featured
>> the XO. Nothing on the backs of Kellogs or General Mills. No
>> donated G1G1 commercials during Saturday Morning cartoons.
>> http://www.youtube.com/watch?v=yFmQP3JimAE&feature=related
>> http://youtu.be/XSH_5YP0tU8
> Ah, but what will happen when we have free digital textbook replacements,
> so that netbooks cost less than printed textbooks? Better education at
> lower cost. Can politicians resist that?
>> Few ever got a clue. Teachers fell further and further behind.
>> The situation was so bad in Hillsboro (personal anecdote), home
>> of Intel in Oregon (Aloha plant) that the police got into the home
>> schooling business, tried to do outreach to tomorrow's gangland
>> by setting up a Linux Lab in West Precinct (where I came in, as
>> a contract instructor).
> I have an idea for going after homeschooling networks with OLPCs and
> Sugar, also.
>> The schools had proved incompetent to do their jobs (educating
>> for the future), so the Chief of Police was stepping in (he was
>> 2nd generation Chinese immigrant).
>> I lectured about this Hillsboro experiment to the London Knowledge
>> Lab on my way to the Shuttleworth Foundation meeting with
>> Helen King et al, our benevolent dictator, Guido, another member
>> of our merry party (Scheme also represented).
> I met Guido at a BayPiggies meeting (Bay Area Python Interest Group) at
> Google, where I mentioned to the audience that both Guido and I were
> trying to compile sugar-jhbuild, and reporting to one of the mailing
> lists, and that I had not been able to do it. He chimed in from the
> audience that he had failed to build it also.
>> This was a meeting about South Africa, making long term plans even
>> then (government officials were part of Mark's entourage).
> The Shuttleworth Foundation funded development of a suite of digital
> learning resources for high school math and sciences for South Africa.
>>> > Are lesson plans and small programs available, for example,
>>> Probably. There are well over 100,000 digital learning resources on the
>>> Net. You can find some of them on pages linked from
>>> http://wiki.sugarlabs.org/go/Open_Education_Resources
>>> We will need a substantial number of teachers to review them, compare
>>> them, and select those that do the best job making concepts clear in
>>> ways that will stay with students.
>> The South African model was shaping up to serve auto-didacts.
>> Kids who could self teach would stand the best chance.
> I would like to see how much of that we can help children learn, given
> that they learn languages and cultures, among other things, with no formal
> instruction.
>> The teachers were proving hopeless. Adult teachers could not be
>> expected adapt to these technologies in sufficient time in sufficient
>> number. Those were the facts on the ground.
> I don't think that that is necessarily so, and I intend to have our
> Replacing Textbooks project create a sufficient set of teacher training
> materials also. On some points, however, we might have to wait until some
> of our XO students enter teachers colleges.
>> It's not like anyone wanted it to be this way. One had to make the
>> best of a bad situation.
>>> > where students could write and
>>> > "drop in" a script that includes integers and the output would not
>>> only
>>> > calculate it, but see the relevance of it in a real world situation?
>>> There are many ways to do that. One of the weirder ones is my Turtle
>>> Art
>>> Turing Machine for addition. ^_^
>>> http://wiki.sugarlabs.org/go/Activities/TurtleArt/Tutorials/Turtle_Art_Turing_Machine
>>> More directly to your needs, Pippy is a Sugar activity that shows a
>>> number of Python examples that students can edit. For example,
>>> Fibonacci
>>> a, b = 0, 1
>>> while b< 1001:
>>> print b,
>>> a, b = b, a+b
>>> Changing the 0, 1 in the first line changes this from a generator of
>>> Fibonacci numbers to a generator of the related Lucas numbers. There is
>>> a Pascal's Triangle program. Plotted mod 2, it reveals a Sierpinski
>>> fractal.
>> "Generator" also has a technical meaning in Python, such that one
>> might actually write a Fibonacci generator (of the GeneratorType).
>>> Relevant Python resources include NumPy and PyGame.
>>> > Or, perhaps, the program controls a "wheelchair" robot and students
>>> would
>>> > write scripts to drive the robot at a certain speed considering the
>>> slope
>>> > of a ramp?
>>> See the Etoys tutorial challenge for programming a "car", and the robot
>>> program in Uruguay with robots controlled by Sugar software.
>> Alan Kay was at that Shuttleworth meeting in Kensington. I'm sure
>> there've been many follow-up meetings which I've not been privy to, plus
>> I've continued to meet with Oregon-based colleagues.
> I met Alan Kay at the 40th anniversary of Doug Engelbart's Mother of All
> Demos at Stanford. I had met Doug previously, and was apparently the first
> to show him an XO.
>> I also work with an outfit in Sonoma County, where Python is concerned.
>>> http://www.flickr.com/photos/christophd/4827926508/
>>> XO turned into a robot thanks to the Butiá project
>>> > As you can see, I am a novice, but I see great potential and am
>>> > willing to learn.
>>> Delighted to meet you.
>> Ed writes a lot of good posts on many a math-related list. I recommend
>> paying attention to his thinking (I know I do).
> Thanks, Kirby.
>> Kirby
>> _______________________________________________
>> Edu-sig mailing list
>> Edu-sig at python.org
>> http://mail.python.org/mailman/listinfo/edu-sig
> --
> Edward Mokurai
> (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر
> ج) Cherlin
> Silent Thunder is my name, and Children are my nation.
> The Cosmos is my dwelling place, the Truth my destination.
> http://wiki.sugarlabs.org/go/Replacing_Textbooks
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig

Edward Mokurai
ج) Cherlin
Silent Thunder is my name, and Children are my nation.
The Cosmos is my dwelling place, the Truth my destination.

More information about the IAEP mailing list