Python for Kids

I’ve been looking through a range of resources to support Python teaching recently. Actually, when I say teaching, what I really mean is STEM Clubs. You could argue that STEM clubs are not teaching in the traditional sense, many of the best clubs are very open-format, the kids get on with little projects, and the adults just nudge them in the right direction, give some encouragement, help them avoid a few big minefields along the way, and generally “coach” them into doing something productive and rewarding.

I discovered Python for Kids[1] a few weeks ago, and I found it a real breath of fresh air to read through this. Many of the texts on Python I found were very much focused on showing off some of the more advanced (and darker corners) of Python. Python does have a few dark corners and even some syntax that makes my eyes water a bit on first reading. Part of this is due to Python’s heritage as a fun, expressive, powerful experimentation language. It’s a scripting language, but it’s very powerful. I wrote a tiny web server in 13 lines of python, and that was only my second program.

But, returning to Python for Kids again, I was thinking through how I might use this in our after school STEM clubs and Saturday Pi club. The book is already very accessible. It’s interesting, has some lovely illustrations, the chapters are quite short, and each chapter is reasonably self contained, focusing on one main topic. There are exercises at the end of each chapter for experimentation. I’ve said on a number of occasions to people I have recommended this book to “you could plonk a kid in front of a Raspberry Pi or a computer armed with Python for Kids, leave them to it, and they would come out to be quite a good programmer at the end of it” – and I truly believe this.

Suddenly there was a flash of inspiration, and I thought back to about 1992, when I was working in a local tertiary college teaching computer programming courses. The maths department at this college had engaged very heavily with a “maths workshop” scheme – it was all entirely driven by worksheets. On the wall was a load of folders, with graded worksheets on each topic. Students would drop in, take a worksheet on a topic, work through it, and either self assess, or ask for a teacher to mark it and give feedback.

I wondered whether this same scheme could be applied using Python for Kids as a central resource. Below is a quick sketch I did based on the first 7 chapters of the book. But, before I go into that, let me just address a side issue for a moment.

Kids and Object Orientation

Now, this is a topic that comes up a lot. Should you teach kids objects? Should you start with objects and work inwards, or start with program statements and work outwards?

If you get into this topic a bit, you’ll realise that there are many evangelists of both methods. I’d love to get them all in a room together to thrash it out, but I think they’d come out agreeing to disagree, but having a good thrash at it in the meantime.

There are merits of both approaches. I think my personal preference is to start with the basic building blocks of statements, and then taking a more problem-lead approach, introduce functions, modules, and then objects as solutions to problems of scale and multiplicity.

There is much evidence the other way that starting at objects and working inwards also works, and for this look at the excellent work done by the BlueJ and Greenfoot projects in refs [2] and [3].

Contrary to this, some discussions I had at the BETT show this year with some senior team members at a leading examinations board, said they had been told pretty much unanimously by all the universities to “leave the object orientation up to Universities to teach – just don’t go there”.

But it’s a bit hard these days – to write any form of interactive program, in any modern language, using any form of modern programming framework, you’re going to bump against objects in some way.

However, Python, being an “incremental learning language”, does allow you to hand wave over this a little bit. pygame, for example, is a good example of a module that you can use, and if you blink a little bit when typing in the dots, you can pretty much ignore objects and still get away with using it.

So, for the moment, I’ve only gone up to chapter 7 in my sketch for Python for Kids, because it’s chapter 8 that classes and objects are introduced.

Worksheets

My idea of a worksheet driven scheme of work is in no way new. But I think it could work in STEM clubs and Pi clubs, mainly because it allows the kids to dip into things as they need them. For this, I think Python for Kids is an excellent resource, because it is already well chunked into self contained sections.

I think I’d like some form of structure or classification of level against the worksheets, so I’ve come up with something I just made up. I’m sure class teachers have lots of lovely ways of classifying the level of material, and I’m sure also that the educational department has its own collection of jargon associated with it. But for the moment, I’ll start with 4 main levels

1. Introducing… this is a worksheet that introduces a topic for the first time. It assumes the reader has no knowledge at all of the topic, so it has to define the basic jargon, explain the problem being solved by the feature, and show some examples or little self contained cookbook snippets that can be typed in to show it in use.

2. Exploring… assuming that you know what the topic/feature is about, this pushes the boundaries of your understanding a little in a few directions, and helps you to try out a few things and apply the idea in a few different ways.

3. Advanced… this does not mean it’s only for the best students, but what this means is that the features discussed are probably not in every day use, and you could probably survive a while without them. But they are likely to stretch you a bit working through them.

4. Making… I think this would be something more like a case study, or a project that makes something specific, that relies quite heavily on a topic or feature. There will be little information available, perhaps a couple of cookbook snippets or template recipes to start from, but definitely a project brief with much room for experimentation and investigation by the reader.

Trial-mapping of Python for Kids

Finally! Here is my first sketch of a suggested way to chop up the first 7 chapters into standalone worksheets. Teachers might like to take this as a first attempt, and turn it into a learning trail, referring to the specific chapters of the book. You could easily build a whole scheme of work for a set of teacher-led classes from this, but my primary purpose here is to come up with a proposal for a set of standalone worksheets we could develop, that kids could pick out of a rack and get on with, that then leads them through the material at their own pace.

I think a worksheet should probably be packaged so it takes you around a half hour to get through it. The simpler worksheets and indeed the more experienced kids might do multiple in one class. The material in Python for Kids on it’s own is probably quite quick to get through, but I think by the time you have read the material, tried some examples, then done a couple of suggested exercises, a worksheet is going to take you a little while to get through. Perhaps the Intro ones will only take a few minutes, I’m not sure yet until I write a few and try them with some kids.

  • intro: Raspberry Pi, what to buy
  • intro: starting with python (ch1)
  • intro: sums and variables (ch2)
  • explore: sums and variables (ch2)
  • intro: strings (ch 3)
  • explore: strings (ch 3)
  • advanced: strings (ch 3)
  • intro: lists (ch3)
  • explore: lists (ch3)
  • advanced: lists (ch3)
  • intro: tuples (ch 3)
  • explore: tuples (ch 3)
  • intro: maps (ch 3)
  • explore: maps (ch 3)
  • intro: turtle (ch 4)
  • explore: turtle (ch 4)
  • intro: if (ch 5)
  • explore: if (ch 5)
  • intro:if/else (ch 5)
  • explore: if/else/elif (ch 5)
  • advanced: conditions (ch 5)
  • intro: variable types (ch 5)
  • intro: for loops (ch 6)
  • explore: for ranges (ch 6)
  • intro: while loops (ch 6)
  • intro: functions (ch 7)
  • explore: funtions (ch 7)
  • intro: modules (ch 7)

I haven’t thought about the making… ones yet. I think those will be more obvious once I’ve looked at the exercises and thought through the types of projects kids will probably want to work on (and therefore how much python they will need to meet their wider goals).

What’s Next?

This is just my first pass list.  I don’t think you’d expect all kids to do all worksheets, but you’d probably suggest a path through them based on what they wanted to do with their programs. Some kids might rocket through the introductory worksheets quickly and work out the rest themselves, and only need pointing at the more advanced ones when they get stuck with a problem. Other kids might quite like having a planned list or trail through the sheets to work through at their own pace.

I’m going to start with the above list, and next look at the exact format and content of a few sample worksheets and see if I can try them out with some of the kids to see how it goes.

The ultimate aim here is to use as much of the content inside Python for Kids as-is, but use worksheets as a way to chunk it further into small digestible well focused bites, so that kids feel they are making progress, and you can easily keep an eye on how they are progressing.

References

[1] Python for Kids

[2] BlueJ

[3] Greenfoot

[4] Raspberry Pi and Python for Kids

This entry was posted in Older Stuff. Bookmark the permalink.

Comments are closed.