- Understand algorithms (written in pseudocode or flow diagram), explain what they do, and correct or complete them
- Understand and use sequence in an algorithm
- Understand and use iteration in an algorithm (FOR, WHILE and REPEAT loops)
Suggested time: 50 mins
I started by giving students a sequence of instructions, which I had printed and cut into pieces, for making a cup of tea (See attached). I asked students, in their teams, to put the pieces in the correct order. After 5 mins, we discussed the different solutions.
I showed students 3 websites and asked them to explain what each website had in common:
1. Google maps: Lands end to John O’Groats
2. How to make a ring wing glider
3. How to make a pancake
Once the students had worked out that they were all instructions, I then explained that an algorithm is basically a set of instructions for solving a problem.
I followed this by demonstrating a simple card trick - courtesy of Mark Dorling (Digital School House). The purpose of card trick is to teach pupils about sequencing and modelling a sequence of instructions. See video below:
At the end of the trick, I divided the students into small teams and gave each team a set of cards. I then challenged each team to try to repeat the trick and to produce step-by-step instructions. (Note: Try to encourage the students to write down every step – this is key for the next part). Alternatively, to speed things up, you could ask for a volunteer – someone confident enough to explain the trick to the rest of the class and another volunteer to write down the instructions on the board.
After each team had completed their step-by-step instructions, I reviewed their answers with the rest of the whole class. I then selected the team with the most detailed set of instructions and showed the instructions to the rest of the class. I then asked the students how could we optimise the instructions. I tried to get them to use words such as repeat or loop. I then asked the students to suggest possible benefits of optimising code – I encouraged students to think about file size, download times, loading times, debugging code and fixing errors etc. I then explained to students about how we can optimize code by using loops and sub-routines.
Finally, I showed students the first task (Making the tea) as a flow chart and explained the different symbols. I then challenged the students to create a flow chart explaining how to perform the card trick. Tip: Don’t worry if the students don’t complete this exercise, the key is that they know the different flow chart symbols and understand how to model a sequence of instructions using a flow chart.
If you are feeling a little adventurous, and have access to an iOS device such as an iPad, you could get your students to use Grafio to create their flow charts.
I finished by reviewing a small sample of students flow charts.
Suggested time: 50 mins
I instructed pupils to visit touchdevelop.weebly.com, click on Student Showcase and view some of the examples.
I explained to students that they were going to learn how to program a turtle by issuing it simple instructions (algorithms).
I asked students to load TouchDevelop (www.touchdevelop.com) on to their computers and sign in using their google, microsoft or yahoo account.
Once logged in, I showed them the link to the TouchDevelop Challenge (touchdevelop.weebly.com/td-challenge.html) and ask them to download the PowerPoint for lesson 1 (TouchDevelop Turtle) and follow the instructions.
Why TouchDevelop? I find that the turtle facility in TouchDevelop is great for introducing students to programming and teaching students how to model sequences of instructions. Alternatively, if you prefer not to use TouchDevelop, there are a number of great alternatives. See my blog on tools for creating games.
I finished with a game of Cargo-bot on the iPad. Cargo-bot is a fun and challenging game designed to teach programming. The idea is simple; players have to program a crane to move boxes back and forth between platforms. The player controls the crane using blocks (Up, Down, Left, Right) which they must place in the correct sequence however, there is only a limited number of spaces to place the blocks meaning that the player is forced to create sub-routines (progs) to optimise the sequence of instructions. The challenge is to move the crane using the least number of instructions. Stars are awarded for the number of instructions used – The more optimised the instructions, the more stars the player is awarded.
Alternatively, if you do not have access to a set of iPads, you could ask students to swap seats and review each others turtle drawings.