Friday, November 25, 2011

Where have you been all my life, Python?

I suppose that I've been spoiled having entered the world of python via SAGE (computer algebra systems, scientific computing, etc). As you can see in the video above, I've been using SAGE, and, in class for some time. I officially introduced SAGE to my high school last year in Computer Math, my introCS class. We use SAGE to run python studying Discrete Mathematics using Gary and Maria Litvin's text which has proven very useful in class. This year I also started a new course entitled Calculus Research Lab using SAGE as a Computer Algebra system to investigate concepts in Calculus using free online Calculus texts in pdf: and and

I only just recently bothered to install IDLE and write source files such as in Ubuntu. Apparently, the current Ubuntu liveCD ships with python 2.6 and is part of it. All I added to the mix was IDLE and I was good to go! Also, I installed the visual module (vpython) and have been playing with that in IDLE as well. In the video above Kirby Urner, a long-time proponent of using python in the mathematics classroom, shows off some of his work especially in geometry, group theory and object orientation. Apparently, there's a lot of math you can do with plain vanilla python!

BTW, you have to take a look at Ron Reiter's awesome website which has lots of python tutorials including turtle code online! All I had to do to use the turtle and visual modules offline is as follows. Python 2.6 and are already installed by default in Ubuntu. So, I ran "sudo apt-get install idle" to make python more user friendly. You don't need IDLE to run python source code, but it makes it very easy for the students. Then I got vpython from the Ubuntu Software Center and vpython needs "sudo apt-get install libgtkglextmm-x11-1.2-dev." VPython works fine in Ubuntu now, but I can't rotate the image with my mouse. I have to look into that a bit.

I'm looking forward to doing a final project with my Computer Math class this year involving python's turtle graphics module or VPython 3D modeling or TI83/89 BASIC programming. In this video we have Gregor Lingl, a math teacher from Austria, showing off his graphics module which is now standard in python 2.6 and above. His turtle module is an object oriented implementation of the classic logo language in python, and and This file is the pdf that goes with Gregor's talk. Here's some documentation for the turtle module from the python website. This is the turtle module itself. Here's Gregor's textbook and using the turtle module. This is more documentation and here's Gregor's website Here's the "Think Python" text by Allen B. Downey with a chapter on turtle graphics.

This clip from Showmedo has Erik Thompson, a physics teacher, showing off the visual module or vpython teaching some physics concepts! Here's more videos from Erik's website. This is the documentation from the vpython website.

Here's another Showmedo by J. Unpingco about Scientific Computing with python in SAGE.

Well, that's all folks!

Teaching with Technology, 

No comments:

Post a Comment