Following our work about the history of controlling computer games last week, this time it was time to teach Year 5 how to program their own using Scratch.
Since this software is free to download (available here), it also meant that the children could install it and use it at home if they wished. If you’ve never seen it before, it’s basically a more advanced version of MSW LOGO which lets you create much more complex and interesting programs – and this is how I introduce it to the children. Now unfortunately if you just open the application up, by default it gives you a cat to move around – to make the progression from piece of software to another easier however, I instead always get them to open up a project file (as Scratch calls them) where I’ve replaced this cat character (or ‘sprite’) with a more familiar and less distracting triangle.
To begin, I keep things simple and limit the children to just using the ‘Motion’ and ‘Pen’ command groups. I demonstrate how each command block can be dragged across into the middle ‘Scripts Area’ and then double-clicked on to be run. I also show them how to snap blocks of commands together so that they will execute in sequence when double-clicked. Good activities here to practice these skills are to challenge the children to draw regular polygon shapes – so drawing shapes like equilateral triangles, squares and pentagons using the ‘Pen down’, ‘Move x steps’ and ‘Turn left/right x degrees’ commands. Two useful tips I also teach them here are how they can use the ‘clear’ and ‘point in direction’ blocks to re-set the main screen (stage area) and how to drag commands back over to the left to delete them – helpful for correcting mistakes when a sequence of commands doesn’t work as expected (this is called ‘debugging’).
After this short introduction, I then let them have a go at programming their own Etch-a-Sketch game. This is a relatively easy program to make since the main element of control is just making the triangle sprite move in different directions around the stage are depending on which arrow key on the keyboard has been pressed. Rather than doing this as a step-by-step tutorial, I provide them with a copy of the final program and just ask them to copy it – similar to the instruction sets you get when building Lego models. All the children always find this straightforward to do since the command blocks are colour-coded depending on which set they are (e.g. motion blocks are blue, pen blocks are a murky green colour etc.) Following a little tip by @twowhizzy, I also include little annotations within this to prompt them to think about what the purpose of each command is.
I encourage the more confident children to try adding extra sets of commands once finished to make the pen to change to different colours and/or thicknesses depending on which number/letter key has been pressed on the keyboard.
This a lesson which I’ve been refining/improving for the last 3 years but I now finally think that it works brilliantly. The children not only loved playing and drawing with their finished etch-a-sketch games, but they also really seemed to like learning how interesting and (perhaps more importantly) how accessible to them programming actually is.