Python for a 10-14 years old?

Simon Brunning simon.brunning at gmail.com
Thu Mar 24 09:38:32 EST 2005


On 23 Mar 2005 21:03:04 -0800, tnozh at yahoo.com <tnozh at yahoo.com> wrote:
> Is there something out there like "Python for kids" which would explain
> *basic* programming concepts in a way which is accessible and
> entertaining for kids aged 10-14 (that about where her brain is right
> now) and which would allow them to "play around" and have fun solving
> small problems?

I don't know about kid's tutorials, but I can recommend that you try
the turtle module. It's great for kids. It gives really good immediate
feedback, You can start out using it interactively:

>>> import turtle
>>> turtle.forward(100)
>>> turtle.left(90)
>>> turtle.forward(100)
>>> turtle.left(90)
>>> turtle.forward(100)
>>> turtle.left(90)
>>> turtle.forward(100)
>>> turtle.left(90)

Then you can put this into a script, and run that. Then you might
introduce loops:

import turtle

for i in range(4):
    turtle.forward(100)
    turtle.left(90)

Then build some simple functions, like 'square':

def square():
    for i in range(4):
        turtle.forward(100)
        turtle.left(90)
        
square()

Then add arguments to your functions:

def square(size):
    for i in range(4):
        turtle.forward(size)
        turtle.left(90)
        
square(100)
square(50)

And so on. At each stage, you can see what's happening.

-- 
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list