My post to the Python for Kids thread is something I've been meaning to get around to with Freja for a while. She's only eight, but the's confident with and facinated by computers, so I thought that giving her a go wouldn't do any harm if I didn't push her.
So far, she's having a blast. At first, she just drove the turtle around, changing its colour on the way. But towards the end, I suggested that she make a square, and she managed that easily enough. I'll have a bash at loops with her soon, but I really don't want to overload her.
There was another script that I knocked up for her that she had fun with, first just running it, then making simple modifications:
your_name = raw_input("What's your name? ")
if your_name.lower() == "freja":
print "You're very stinky,", your_name
else:
print "You smell lovely, ", your_name
She worked out for herself how to replace 'freja' with 'daddy'. Ah, simple pleasures. ;-)
Note to self: Check out PyLogo.
Posted to Python by Simon Brunning at March 26, 2005 04:25 PMAnd don't forget that PythonCard includes a very powerful, easy to use, version of the turtle as one of it's sample applications;
http://pythoncard.sourceforge.net/samples/turtle.html
Posted by: Andy Todd on March 27, 2005 12:30 AMA friend of mine at work is doing som ething similar with his kids - but he's doing it TDD!
Posted by: sam newman on March 27, 2005 02:22 PMCool, for small values, and Geeky, for large values.... but sweet, coz it reminds me of when I was a kid typing in old Spectrum 48 games from magasines. Now those were the days...
Posted by: Mark Matthews on March 31, 2005 01:51 PMAnd now in groovy...
println "What's your name? "
def yourName = System.in.readLine()
if (yourName.toLowerCase() == "simon")
println "You're very stinky,$yourName"
else
println "You smell lovely, $yourName"
(note: tabs swallowed by comments display)
Posted by: jez on March 31, 2005 03:15 PMI would recomand GvR.
gvr.sf.net
In Logo...
TO ASK
MAKE "NAME READRAWLINE
IFELSE :NAME = "DAD [
PR SE [You're very stinky] :NAME
] [
PR SE [You smell lovely] :NAME
]
END
Hrm... unfortunately while this works in PyLogo the comparison is case-sensitive (which I didn't actually intend it to be). And it only works in console mode (scripts/pylogo -c -- from a recent checkout).
Posted by: Ian Bicking on April 4, 2005 05:59 PMVery interesting. I too have been thinking of getting my 8 y.o. interested but the stumbling block would be the choice of editor. What did you end up using?
Posted by: Chai Ang on April 5, 2005 04:33 AMWe used SciTE, Chai. I use it a lot these days; it's as light as a feather, it supports all the edit functions that I seem to need to use, and it understands Python - even to the extent that hitting F5 runs your script. You can drive it from the keyboard, but also with the mouse, which is good for Freja.
Posted by: Simon Brunning on April 5, 2005 08:31 AMIan,
That's a win for Python, then. ;-) Real logo is great for turtle stuff, but it's horrible for anything else. Python's turtle module is good enough (k=just about - there are a couple of changes I'd like to make...), and it's good at everything. Only one language to learn.
She'll be using metaclasses by ten, you mark my words. Bytecode hacks by twelve.
Posted by: Simon Brunning on April 5, 2005 08:48 AMWhy not Java?
public class YouSmell
{
public static void main(string[] args)
{
// I give up
}
}
well i am now a expert and have my own laptop that dad brough me and i cam write all the programs i want but mainly about how much dad smells
i am 12 now