[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[seul-edu] Programming Mathematics



Programming Mathematics
-----------------------
Programming is one of the strong points for using Linux in
mathematics and science education. And I personally think 
that programming mathematics is one of the tools that
teachers can use to teach mathematics. In order to be able
to write a program that will, say, solve a system of
equations, a student will have to learn an awful lot about
the topic of systems of equations.

Desktops and office technology software work in the office
because they just address problems that come up every day
and that people already know how to handle (write a memo
to someone else).  The problems that come up in math and
science are very different than the problems encountered
in an office environment. Ultimately, programming is
important because you don't KNOW what the answers are to
a lot of the questions that come up in math and science.
You have to, well, write a program, that helps you solve
the problem.

I hit a brick wall when I went looking for elementary K-12
programming activites for math. I was surprised and
disappointed because I was expecting to find many examples
of math programs for kids in a wide variety of computer
languages.

All I found were some applications for bc, one link that
someone posted a few days ago (thanks for that!), and some
simple examples that come with a basic compiler called "basic-c".

What I want are some super simple programs, that have something   
to do with math, for the programming languages that are freely
available with Linux. I thought I would put together a dozen or so
simple programs - and I mean REALLY simple - that have 
something to do with math, and show what the syntax would be
for all of the different languages, how to compile them
(if necessary), and how to run them.

I think the reason I can't find anything like this is that it is
TOO simple. It would be an easy thing to organize, but it's so
boring that no one thinks it would be useful. You've got to  
remember that a lot of teachers have absolutely no experience
with computers. Let me explain? They're gripping the mouse in 
one hand and have their other hand poised over the keyboard, then
they bang the keyboard with the mouse. Once, a teacher figured  
out that the arrow on the screen corresponded to the mouse. They 
discovered that when the mouse goes right, the arrow goes right.
When the mouse goes left the arrow goes left. To get the arrow to
go up, they **lifted** the mouse off the mouse pad ...   

If your are a math teacher and you have finally got Linux  
installed on your machine, and you are staring at the console
(you are not experienced enough yet to use a mouse) and you
want to do some math or run a program, what do you do? That's
what I want to be able to have in place for them.
                

For example, to factor a number

Just type
                
        factor 33333,
                   
(oh, and don't forget to press enter.)

                
Wish list for programs with 2-10 lines of code
(10-50 max):
                
  A program that does a loop and prints the numbers from 1 to 10.
  A program that factors a number.
  A program that generates a list of prime numbers and prints
    the results to a file.
  A program that reads a list of numbers from a file and prints their
    factors.
  A program that uses the Euclidean Algorithm to prind the gcd
    two numbers.
  A program that computes a factorial using recursion.
  A program that prints an addition table,
  A program that prints a multiplication table,
  A program that prints a multiplication table mod n.
  A program that prints the sum of two squares.
  A program that inputs b,n, and p and prints b^n mod p
    for n=1 to n-1.

  .... what else?

in all of these languages

                bash
                awk
                bc
                perl
                C
                expect
                fortran
                java
                javascript
                php
                lisp
                python
                tcl/tk
  
                mupad
                maxima
                octave
                pari
  
  .... what else?
  
If you have any super simple starter things like this, 
or know where it exists on the web, let me know. 
I'll do a lot of it myself, but the less time it takes
the better.
  
L. Prevett
Mathematics Instructor
Cochise College, Sierra Vista, AZ, US
prevettl@cochise.cc.az.us