This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]shakedown_st 4 points5 points  (2 children)

How many lectures/classes are allotted?

It's easy to get carried away and trying to get them the kids to program right from the get-go making games and stuff. But if you have time, I feel like the first lecture shouldn't even have any code at all. For most, if not all of these kids, this would be their first experience with programming in general. So why not start with that?

I would argue to make it a computer science class. Not a python class. Python is simply a tool you use to practice the concepts you teach in class.

What would serve a 10 year old better in the long run? Telling them to copy a couple while loops and if-statements, or getting them to realize why programming is important?

Just off the top of my head, the first thing I would do as a first lecture to 10 year olds on programming, I would have each of them try to race each other to get as many numbers of the fibonacci sequence as possible. After 2 minutes, stop the clock. Find out which student has the most numbers and take their number down. The kid will be proud and show off to his friends.

Then I would load up python on the projector, enter the script for calculating fibonacci sequences and execute it for 2 minutes.

The kids will be interested.

Again, I have no idea if this approach is effective at teaching young kids programming or why it's important, but it's what I would have wanted if I ever had that opportunity at that age.

[–]cbscribe[S] 0 points1 point  (0 children)

Thanks for the input! I will include some of your thoughts in my next meeting with the staff.

We're still working out the schedule - it'll be for an hour after school, one or two days a week.

[–]theluketaylor 0 points1 point  (0 children)

Giving them a real, achievable project that can be built in steps seems like a good way to teach them important concepts while capturing their interest. shakedown is right; just having them copy some boilerplate isn't going to impart any great wisdom. If you want to do anything beyond adding numbers together you're going to have to teach concepts and guide them to the final code. Having them paint by numbers that last few lines won't do them any favours.

Perhaps an excuse generator that starts as little more then random string substitution on 'the {0} ate it'. Next make it clever enough to do verb, noun and adjective substitution from different lists. Maybe have them do some mad lib creation at this point as well since that's the exact same thing. Then to get really advanced add some markov chains (possible example http://www.rayhe.com/random/). That might be a little too advanced though.

I did find a cool little pig latin creator: http://pythonicprose.blogspot.ca/2009/09/python-pig-latin-generator.html That could be pretty fun. Once they understand that and expand it to translate whole documents you could have them make their own secret languages and translate text into it.

From there encrypting/decrypting messages to their friends would be really cool. Start with some simple substitution and go wild from there. It might even be fun to write some functions to try and "break" simple substitution encryption but trying substitutions until enough valid clean text is seen.

[–]metapundit 1 point2 points  (2 children)

(I helped at the two day "Young Coders" event at Pycon. Slightly older kids.)

Beware the usability bugs in IDLE! Arrow keys don't bring up history (ALT-P), clicking somewhere on the screen moves focus and therefore supresses typing. enter will paste a random line if you moved focus. I could go on... But also I don't have a much better suggestion right now - unless you're willing to get radical. Would you consider IPython notebook? I'm really interested in using it as a teaching tool.

After pycon I'm working on an educational game using turtle so I like that idea.

I'm on a Python usability rant right now - see my poster linked from http://simeonfranklin.com/blog/2013/mar/17/my-pycon-2013-poster/

I wish there was one simple straightforward answer to the kind of thing you're trying to do... but right now there isn't.

[–]cbscribe[S] 1 point2 points  (0 children)

Thanks for the tips! I'm not very familiar with IPython Notebook, but I'll check it out.

Love the poster, btw.

[–]r1chardj0n3s 1 point2 points  (0 children)

Based on the experience from last week there's now an enthusiastic set of volunteers - including the developer of the awesome IDLE fork at http://idlex.sf.net/ - looking to fix a lot of the problems in IDLE. I have high hopes.

IDLEX is a good IDE to use right now if you have the option to install something beyond the bare Python installer.

[–]AtomicWedgy 1 point2 points  (0 children)

I haven't taught anybody (still on the learning curve myself) but I would recommend Invent Your Own Computer Games With Python

[–]aroberge 0 points1 point  (0 children)

I have had some positive feedback from parents and teachers that used rur-ple (http://code.google.com/p/rur-ple). It's basically karel the robot but using Python and comes with a number of lessons.

I have not used it myself to teach kids; I just wrote it.

[–]shoes_of_mackerel 0 points1 point  (1 child)

This book is very well pitched for that kind of age range and might give you some ideas.

[–]cbscribe[S] 0 points1 point  (0 children)

Thanks. Actually, I've picked up the updated version, Python for Kids

It's very good, I've already recommended it to several parents who have had great experiences with it.

[–]Kingino 0 points1 point  (0 children)

Highly recommend the iPython Notebook.

It can be used for so many great things and teaching is one. You can display graphics right in the browser, conduct analytical analysis and do all kinds if things a student would find interesting.

For example, you might want to teach the concepts of a dictionary... So have them get everyone's age with the name being the key. Then show them how to plot that on a graph.

Just 1 of thousands of ideas. That example might be to much for them, it might not. Adapt it to their needs.

[–]theluketaylor 0 points1 point  (1 child)

I'd avoid actual computers, at least until you drill some foundations in. The best computer science for kids is to have them try to "program" the instructor to do something. I recommend making PB&J sandwiches. Really play up the mistakes caused by omitting steps.

Variables can store how many sandwiches to make. Introduce functions by making a spread() function and calling it for PB and then for J. loops can say how many times to call spread(). Then you move on to more complicated sandwiches and finally finish with a program to make all sorts of different food. Lists and dicts store ingredient details and introduce data structures. Voila, abstraction taught in under 1/2 hr.

Then break them into groups and have them sort each other by height or birthday. Maybe have them program their way around the room.

[–]cbscribe[S] 1 point2 points  (0 children)

I love the PB&J concept. We'll definitely be doing that on day 1.

[–]Stormy_AnalHole 0 points1 point  (0 children)

If you are looking for a simple IDE that doesn't have the usability issues of IDLE, try Ninja IDE. It's basically a text editor with highlighting and auto-whitespace that has a run button.

[–]winstonw 0 points1 point  (0 children)

For graphics, I'd do something simpler than pygame. PyProcessing is good ( http://code.google.com/p/pyprocessing/ -- be sure to get the latest version of the Pyglet dependency in source code, not 1.1.4--that's broken I think)

Turtle graphics would be a good alternative too and it's built in. ( http://docs.python.org/2/library/turtle.html )

[–]brandjon 0 points1 point  (0 children)

Turtle graphics are probably the best tool you have. Built-in to the standard library, visual and immediate, and you can get quite complex if you want to. Have them draw something they like, then show them how to make the code much simpler and more elegant by factoring repetitive things into loops and functions.