What do we already know? Recap the Blockly commands previously encountered
Use the core programming commands appropriately to a visual language
Understand the repeat while command
Explain to the students that in this block of work, they are going to learn how to write code for computer programs the way programmers in industry do.
They will be using a language called Python which is used by lots of computer programmers.
Before that, it is important that everyone remembers the programming skills they have learnt using Blockly, so the first session will be about sharing what everyone knows.
Run through the Blockly vocabulary they have already come across, using the Blockly cards in the Assets part 1 and 2.
Can you explain what these blocks of code will do using the programming language you have already learnt?
Show Level 51 on the IWB. Explain that they can only use a certain number of blocks, so there is an extra challenge [fig S9.1].
Ask the students to work on Levels 51 to 56, individually if possible, so that you can assess their confidence and understanding in using the movement and repetition commands.
Discuss how they have done so far and choose some students to explain how they tackled a particular level.
Can you explain how the repeat until at destination command works in Level 55?
Introduce repeat while not at destination as an equivalent to repeat until at destination.
Illustrate this idea by playing a ‘repeat until the sign says STOP’ game where students repeat a clapping or movement rhythm until you hold up a STOP sign. Write the instruction ‘repeat until the sign says STOP’ on the flipchart/board.
Rename the game ‘repeat while there is NOT a STOP sign showing’, writing this on the flip chart and play again.
The class should see that the instructions work identically.
Explain that in Level 57 they have a repeat while block, rather than a repeat until block.
Display these code wall cards together for comparison.
Give the students a few minutes to discuss in pairs how they would write the program, and choose a pair to explain their thinking.
Ask the class to try Levels 57 and 58. Those who complete these quickly can go on to Level 60.
Give them the resource sheet to record their algorithm for Level 57, and explain that you will be discussing this at the end of the lesson. [fig S9.2]
Look at Level 57 together on the IWB. [fig S9.3]
Choose a student to come and explain how they programmed a solution. Ask if anyone found a different solution.
Does it matter which order the if conditions are listed? Why not?
Is your solution as efficient? Can you explain how it works?
Use this opportunity to assess student’s understanding of the concept of selection.
Finish off by discussing what they have learnt in this session.
Resources | Vocabulary |
---|---|
• Interactive Whiteboard (IWB)
• Levels 51–60 in Rapid Router
• Resource sheet
• Levels Guide
• STOP sign on A4 card (teacher made)
• Assets part 1 and part 2 — Blockly cards
• move forwards, turn left, turn right
• repeat
• repeat until at destination
• repeat while not at destination (introduce this in preparation for Python)
• if... else if... else