[Edu-sig] teaching Python

John Zelle john.zelle at wartburg.edu
Tue Nov 23 20:00:42 CET 2004


Darren,

Teaching programming is not easy, but it can be very rewarding. My 
experience is in teaching at the college level, but I think what I have 
learned would also be good at the high school level.

Darren Payne wrote:

>Sorry all - this post will probly stir up a commotion.
>
>I have been keen on Python for quite a while. I have
>tried using it ti teach programming in a high school
>situation and would have liked to extend into PyGame.
>Sadly, though I feel I DO understand object oriented
>concepts, I DO NOT have any idea of determining what
>objects to create. Similarly, as there is SO MUCH to
>learn before one becomes capable of completing even
>simple tasks like a blackjack cardgame (with gui too)
>  
>
Some on this list have suggested that Python is "too rich" to be good 
language for young or first-time programmers. I cannot agree with this. 
Yes, Python is a real-world language, but what makes it so useful in the 
real-world is its simplicity and clean design. All general purpose 
languages are powerful. Python is one of the easiest to learn. That 
said, programming _is_ hard. Not everyone can do it well, but my 
experience has been that anyone who really tries can learn to do useful 
things with Python.

In my introductory class, we teach real programming in Python. I use a 
simple graphics package that allows students to play with graphics 
objects in a simple way. This keeps them motivated, and by the end of 
the semester, they can program an interactive Blackjack game with a 
simple GUI. I've used that project several times, this semester we're 
doing mastermind.

>... I am finding students get turned off before they
>even get a chance to see what can be done. I know ...
>it must be just me and the way I teach it. 
>
The key here is finding interesting problems (or problems that can be 
made interesting) that don't necessarily require a lot of code. 
Different students find different things interesting, but I have found 
that virtually all of them seem to groove on some simple graphics 
programming.

>However, I
>have recently revisited Gamemaker. I saw it a few
>years ago and could not make much sense of it. But now
>it is up to version 6, there are loads of fantastic
>tutorials to follow along with. 
>
I don't know much about Gamemaker, but what little I have seen suggests 
to me that learning it may be fun, but does not teach the students very 
much of lasting value. Do they learn underlying principles of computing 
such as how data is represented, and what problems can be solved 
algorithmically? Do they learn anything at all that they can take away 
and apply to something  besides making games in gamemaker? I don't know 
the answer to these questions, but I suspect it's "no."

>I have introduced it
>to classes from Yr7 - 10 and they love it whereas only
>2 - 3 of the really "nerdy", "geeky" kids appreciated
>Python!
>My feeling is that Python will never be widely used
>(in schools) unless we can get a PyGamemaker package.
>  
>
Games are nice to generate interest, but there are other interesting 
avenues as well. Graphical programs of all sorts, simulations, even 
numerical programs, if properly motivated can prove interesting. For 
example a discussion of what factorial means in terms of rearrangements 
followed by an algorithm and demonstration can actually keep a lot of 
students very interested. They get a real kick out of computing 100! 
(easy to do in Python, not so in other languages). Simple chaotic 
programs are another example, if you introduce things like the butterfly 
effect, even a simple sequence of numbers can be interesting.

Now the shameless plug. If you are interested in using Python to really 
teach programming and computer science to high school students, take a 
look at my book: "Python Programming: An Introduction to Computer 
Science." Quite a number of high schools having been using it with good 
success. Programming is not all fun and games, but it's "hard fun" as 
has been said many times in this group.

>Even girls have a ball with gamemaker!
>  
>
This is an interesting comment. In CS education we wrestle with how to 
get more girls involved with computers and programming. At many 
conferences I've been to, female presenters have argued that girls and 
young women are turned off by game-oriented projects. That has not been 
my experience, and apparently not yours, either.

Just my 2 cents.

--John


More information about the Edu-sig mailing list