Python for a 10-14 years old?

J

Jot

Hi,

I am blessed with a *very* gifted nine-years old daughter for whom I
have recently installed an old GNU/Linux Mandrake 7.2

If she's really gifted i hope she dumps that obsolete monolithic kernel
as soon as she realizes that such beautiful language as python shouldn't
be used on top of ugly, badly designed software.
 
R

R.Meijer

Jot said:
If she's really gifted i hope she dumps that obsolete monolithic kernel
as soon as she realizes that such beautiful language as python shouldn't
be used on top of ugly, badly designed software.


Did somebody say off-topic?

Anyway, I myself am 14 years old and I can make simple python scripts already by
learning it off the official tutorial that comes with it. My tip: let her take
her time with a normal adult tutorial, and give her small assignments every few
chapters just so she gets it.
 
B

Bengt Richter

In the chess world, people have long learnt to take young prodigies
seriously. Most of the grandmasters start to play chess at age 4 or
earlier. Bobby Fisher became the US chess champion at age 14, and a
grandmaster at 15. And that's considered old by modern standard: Sergei
Karjakin became grandmaster at age 12.

http://www.chessbase.com/newsdetail.asp?newsid=310
http://members.lycos.co.uk/csarchive/gilbert.htm

Sure, programming's skill set is a bit broader than chess playing or
ice-skating, but young hackers have plenty of contacts and resources
through internet, and many of them live (will be living) in Brazil,
Russia, India and China (the so-called BRIC countries.) So, a thorny
question for matured programmers is: what's your value in face of this
competition? :)

I guess that depends on how you measure value of human beings and competition ;-)
What is best to teach children about that?

If you imply that any child's "value" is measured only by their competitive
performance rank in some arena, or that their OWN value as a human being
is insignificant compared to the value of their prodigious talent,
that may be an effective motivational framework for some of them,
but I'm not sure it's not ultimately cruel to celebrate the gift if
ignoring whose burden or blessing it actually is.

Emotionally, they may grow to see themselves as ugly, with their own gift
being a stunningly beautiful sister who gets all the attention.

Or they may identify with their gift and become insufferable narcissistic
egotists as a refuge from human isolation and emotional starvation.

Or they may become wonderful human beings after all, happy stewards of
what becomes a gift to humanity, not just an advantage to exploit meanly.

Regards,
Bengt Richter
 
L

Leif B. Kristensen

R.Meijer said:
Did somebody say off-topic?

I'd say it's a "Troll -1". Anyway, that'd be my moderator response over
at Slashdot. As had been said so many times; GNU/Hurd is still a
pipe-dream. Those who think that the Linux kernel is based on faulty
concepts should really get their act together and produce their own
microkernel. Personally, I don't care about the kernel architecture as
long as I've got a system that works right here, now.
Anyway, I myself am 14 years old and I can make simple python scripts
already by learning it off the official tutorial that comes with it.
My tip: let her take her time with a normal adult tutorial, and give
her small assignments every few chapters just so she gets it.

If I may ask, do you think that the "How to think like a Computer
Scientist" is a good starter? I'm 52 years old and learned my basics
with Swan's "Mastering Turbo Pascal 5.5" way back when, but I'm
sincerely wondering what your generation think are hi-class tutorials.

I've got a thirteen-year old daughter to whom I have recently taught the
HTML basics, but she doesn't readily take to actual programming. If
you've got any idea what I should push to her to get her fascinated
about _real_ programming, I'd be obliged. Or maybe her head isn't
screwed together that way, what do I know.
 
V

Ville Vainio

Bengt> Or they may identify with their gift and become
Bengt> insufferable narcissistic egotists as a refuge from human
Bengt> isolation and emotional starvation.

Bengt> Or they may become wonderful human beings after all, happy
Bengt> stewards of what becomes a gift to humanity, not just an
Bengt> advantage to exploit meanly.

Or they may determine to be exactly what they feel like being at the
moment, independent of what their parents or the surrounding world
feel they should be.

(urgh, way too serious to be pythonic, but it's 5:14am here)
 
P

Paul Rubin

Leif B. Kristensen said:
I've got a thirteen-year old daughter to whom I have recently taught the
HTML basics, but she doesn't readily take to actual programming. If
you've got any idea what I should push to her to get her fascinated
about _real_ programming, I'd be obliged. Or maybe her head isn't
screwed together that way, what do I know.

I wouldn't push. She can figure out for herself what fascinates her.
 
J

Jules Dubois

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

It's not what you asked for, but you should consider Squeak Smalltalk and
eToys. The GUIs that we use today are largely the work of Alan Kays's
group at Xerox in the 1970s. Dr. Kay has spent the last 35 years trying to
make computers educational and fun for children. If you're interested, see

http://www.squeak.org/ (The Squeak Smalltalk site)
http://www.squeakland.org/ (The eToys site)

Squeak runs on Linux, MacOS, and even Windows, and it's free.
 
P

Paul Rubin

Jules Dubois said:
It's not what you asked for, but you should consider Squeak Smalltalk and
eToys. The GUIs that we use today are largely the work of Alan Kays's
group at Xerox in the 1970s. Dr. Kay has spent the last 35 years trying to
make computers educational and fun for children. If you're interested, see

Speaking of which, I should have mentioned the book "Mindstorms" (for
TN, not his daughter), by Seymour Papert. The intro is online:

http://www.papert.org/articles/GearsOfMyChildhood.html
 
L

Lucas Raab

Leif said:
R.Meijer wrote:




I'd say it's a "Troll -1". Anyway, that'd be my moderator response over
at Slashdot. As had been said so many times; GNU/Hurd is still a
pipe-dream. Those who think that the Linux kernel is based on faulty
concepts should really get their act together and produce their own
microkernel. Personally, I don't care about the kernel architecture as
long as I've got a system that works right here, now.




If I may ask, do you think that the "How to think like a Computer
Scientist" is a good starter? I'm 52 years old and learned my basics
with Swan's "Mastering Turbo Pascal 5.5" way back when, but I'm
sincerely wondering what your generation think are hi-class tutorials.

I've got a thirteen-year old daughter to whom I have recently taught the
HTML basics, but she doesn't readily take to actual programming. If
you've got any idea what I should push to her to get her fascinated
about _real_ programming, I'd be obliged. Or maybe her head isn't
screwed together that way, what do I know.

I found "How to Think Like a Computer Scientist" a very good book. It
was very well written and didn't push too many things onto you at once.

--
--------------------------
Lucas Raab
lvraab located at earthlink.net
dotpyFE located at gmail.com
AIM: Phoenix11890
MSN: dotpyfe "@" gmail.com
IRC: lvraab
ICQ: 324767918
Yahoo: Phoenix11890
 
J

Jeff Sandys

How to Think Like a Computer Scientist is a great book for this
age group. It is easy to read, in nice easy to digest steps, with
enough examples. I will be using this book for a Middle School
(7-8 grade, 12-14 year old) Python Programming Club. The hard
part is guiding students into rewarding projects that can be
accomplished in a short time.

John Zelle's _Python Programming: An Introduction to Computer
Science_ is also a very good, but it is aimed at high school and
first year college students.

Another thing that might be useful is if she has a friend that is
interested in learning programming. They can pair program with one
reading the book while the other drives the computer. Learning is
faster and more fun with pair programming.

Check out the Python Edu-SIG:
http://www.python.org/sigs/edu-sig/
 
C

cfbolz

Simon said:
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:


FWIW there is a German Book called called "Python für Kids" by Gregor
Lingl which is mostly based on the turtle module. My little brother (13
then) actually learned Python with it.

Carl Friedrich Bolz
 
J

Joal Heagney

Simon said:
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:

Aaarrrrggggghhh. I've been using python on and off for six years now,
and I didn't even know that it had a turtle module. :)

Turtle was the first experience I had with programming!

Joal
 
J

Joal Heagney

Simon said:
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:

<snip>

Couldn't help myself. I had to write the Dragon Fractal in python.turtle
:)




"""Generates the L-System for the Dragon Fractal, using
the turtle module."""

import re, turtle
from math import sin, pi

"""The default L-System rules for the dragon fractal are:
Angle 45 degrees
Starting Axiom FX
F =
Y = +FX--FY+
X = -FX++FY-

I've optimised them a little bit the following ways:
Take out all occurances of F.
Replace Y with +FN--FY+
Replace X with -FX++FY-
Replace N with X
Take out all occurances of -+
Take out all occurances of +- """

def rules(instring):
"""I originally had this as a series of nested re.sub expressions.
Once the rule list got long though, I split it up to make it more
"pythonic". """
newstring, subs = re.subn("F", "", instring)
# Use N as a placeholder for X
newstring, subs = re.subn("Y", "+FN--FY+", newstring)
# So that we don't get double substitution.
newstring, subs = re.subn("X", "-FX++FY-", newstring)
# Now we replace the placeholder with X
newstring, subs = re.subn("N", "X", newstring)
# And optimise the string in regard to left/right turns.
subs = 1
while subs:
newstring, first = re.subn("-\+", "", newstring)
newstring, second = re.subn("\+-", "", newstring)
subs = first + second
return newstring

def colorator(value):
# Makes the colour of the cursor cycle.
range, fract = divmod(value*6, 1)
if range == 0:
red = 1.0
green = fract
blue = 0.0
elif range == 1:
red = 1.0 - fract
green = 1.0
blue = 0.0
elif range == 2:
red = 0.0
green = 1.0
blue = fract
elif range == 3:
red = 0.0
green = 1.0 - fract
blue = 1.0
elif range == 4:
red = fract
green = 0.0
blue = 1.0
elif range >= 5:
red = 1.0
green = 0.0
blue = 1.0 - fract
return red, green, blue

# The default is that the turtle will only move one pixel
def parser(parsestring, distance=1, angle=45):
# First we clean up the parsestring
newstring = re.sub("X", "", parsestring)
newstring = re.sub("Y", "", newstring)
# Clear the screen
turtle.clear()
strlen = len(newstring)
colorinc = 1.0 / float(strlen)
turtle.color(colorator(0))
for i in range(strlen):
value = newstring
turtle.color(colorator(float(i) * colorinc))
if value == "+":
turtle.right(angle)
elif value == "-":
turtle.left(angle)
elif value == "F":
turtle.forward(distance)
# Hide the cursor
turtle.color(1.0,1.0,1.0)

def run(count=15, distance=1, angle=45, width=1):
string = "FX"
while count > 0:
string = rules(string)
count -= 1
# "Hide" the cursor while we are moving it.
## print string
turtle.width(width)
turtle.color(1.0,1.0,1.0)
# Move the cursor so the turtle won't go off the screen.
# You might want to resize the turtle screen while the program is doing this
turtle.setx(100)
turtle.sety(-200)
parser(string, distance=distance, angle=angle)


if __name__ == "__main__":
run(15)
 
A

Aahz

But here I am discussing other kind of intellectual capabilities,
in particular the ability to learn a programming language.

I think the problem most kids face is *not* lack of intellectual
capability, but lack of concentration. Most kids cannot keep
their concentration focused on a single topic for a long period
of time, so they start one thing and never finish it, since
they have a thousand other little things to do in the mean time.

That's part of it. Another issue is that general problem-solving skills
do increase with experience. I also think that programming ability
tracks reading/writing ability to at least some extent, and while there
are child prodigies with language, they seem to be rarer than smaller
skillsets.
--
Aahz ([email protected]) <*> http://www.pythoncraft.com/

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code --
not in reams of trivial code that bores the reader to death." --GvR
 
A

Aahz

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?

Take a look at http://www.python.org/moin/BeginnersGuide/NonProgrammers
where there are a couple of bits oriented toward younger people and lots
of bits oriented toward adults. I'm sure something there will strike
your daughter's fancy.
--
Aahz ([email protected]) <*> http://www.pythoncraft.com/

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code --
not in reams of trivial code that bores the reader to death." --GvR
 
A

Arthur

It's not what you asked for, but you should consider Squeak Smalltalk and
eToys. The GUIs that we use today are largely the work of Alan Kays's
group at Xerox in the 1970s. Dr. Kay has spent the last 35 years trying to
make computers educational and fun for children. If you're interested, see

http://www.squeak.org/ (The Squeak Smalltalk site)
http://www.squeakland.org/ (The eToys site)

Squeak runs on Linux, MacOS, and even Windows, and it's free.

I again take the opportunity to raise a hand in protest.

Going to these sites I learn that Kay is the "Father of the Personal
Computer" working from "a deep understanding of how children learn".

He also may be someone who married himself to a bad idea 30 years ago,
in which he has invested too much, thereby crippling his ability to
confront scientific evidnce in an evenhanded manner.

He is also someone ex of Disney, now of HP, who lectures us on the
destructive infleunce of the profit motive on the development of
computer science and its capacity to enhance our world.

I understand better how Xah Lee got to be Xah Lee when confronted with
the cult of Kay.

Art
 
L

Lee Harr

Couldn't help myself. I had to write the Dragon Fractal in python.turtle
:)

That's nice. I ported it to use the pygsear Turtle class.
http://www.nongnu.org/pygsear/


--- Dragon.py 2005-03-27 08:48:13.000000000 -0500
+++ pDragon.py 2005-03-27 16:33:48.000000000 -0500
@@ -1,9 +1,14 @@
"""Generates the L-System for the Dragon Fractal, using
-the turtle module."""
+the pygsear.Drawable.Turtle class."""

-import re, turtle
+import re
+#import turtle
+from pygsear.Drawable import Turtle
from math import sin, pi

+turtle = Turtle()
+#turtle.visible = False
+
"""The default L-System rules for the dragon fractal are:
Angle 45 degrees
Starting Axiom FX
@@ -65,7 +70,7 @@
red = 1.0
green = 0.0
blue = 1.0 - fract
- return red, green, blue
+ return red*255, green*255, blue*255

# The default is that the turtle will only move one pixel
def parser(parsestring, distance=1, angle=45):
@@ -73,13 +78,14 @@
newstring = re.sub("X", "", parsestring)
newstring = re.sub("Y", "", newstring)
# Clear the screen
- turtle.clear()
+ #turtle.clear()
strlen = len(newstring)
colorinc = 1.0 / float(strlen)
- turtle.color(colorator(0))
+ turtle.set_color(colorator(0))
for i in range(strlen):
value = newstring
- turtle.color(colorator(float(i) * colorinc))
+ color = colorator(float(i) * colorinc)
+ turtle.set_color(color)
if value == "+":
turtle.right(angle)
elif value == "-":
@@ -87,7 +93,7 @@
elif value == "F":
turtle.forward(distance)
# Hide the cursor
- turtle.color(1.0,1.0,1.0)
+ turtle.uclear()

def run(count=15, distance=1, angle=45, width=1):
string = "FX"
@@ -96,14 +102,15 @@
count -= 1
# "Hide" the cursor while we are moving it.
## print string
- turtle.width(width)
- turtle.color(1.0,1.0,1.0)
+ turtle.set_width(width)
+ #turtle.color(1.0,1.0,1.0)
# Move the cursor so the turtle won't go off the screen.
# You might want to resize the turtle screen while the program is doing this
- turtle.setx(100)
- turtle.sety(-200)
+ #turtle.setx(100)
+ #turtle.sety(-200)
parser(string, distance=distance, angle=angle)


if __name__ == "__main__":
run(15)
+ raw_input()
 
C

Christos TZOTZIOY Georgiou

OT/trivia : if it was between mid-eighties and early nineties, the company
could be "Goupil" (ancien french for "Fox").

Exactly! That was it... it was October or November 1981, though (early
eighties).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top