AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

From steps to blocks

Week 2 · Unit 1: Be a game developer · 3 lessons
2

Match each step to a block

Computing 2: Unit 1, pp. 8–23
GoalTurn an algorithm into a program by matching a block to every step.
New words
block · one picture piece of coderun · to make a program start and do its jobspin · to turn around on the spot
Explanation

We make a program in four steps. First, break the task into parts. Second, write the algorithm. Third, match one block to each step and join the blocks with no gaps. Fourth, run the program and look at the result. If the result is wrong, check the algorithm and the blocks again. A spin is counted in twelfths of a full turn, so spin 12 is one whole turn.

1 break into parts2 write the algorithm3 match the blocks4 run it
Worked examples
3start ongreen flagturnrightend
Algorithm: 1 Start on the green flag. 2 Spin right 3. 3 Stop. The program has three blocks, one for each step.
23start ongreen flagmoveupmoverightend
Algorithm: 1 Start on the green flag. 2 Move up 2. 3 Move right 3. 4 Stop. The blocks are joined in the same order as the steps.
3612turnrightturnrightturnright
Turns are counted in twelfths. Turn 3 is a quarter turn. Turn 6 is a half turn. Turn 12 is a whole turn.
Class activity

Human program: stand up in a clear space. Spin right 3 means turn a quarter of the way round to your right. Try spin right 3, then spin right 6, then spin right 12. Which one brings you back to face the same way? Now write a 4-step algorithm for a friend, such as start, spin right 6, hop 2 times, stop, and watch your friend run it. If you have a computer or tablet, an adult can help you build it in ScratchJr.

Practice
1
How many whole turns is spin right 24?
2
Is this a quarter turn, a half turn or a whole turn?
6
3
Which block is missing? Algorithm: 1 Start on tap. 2 Move up 4. 3 Spin right 12. 4 Stop.
4?
4
Put these in the right order: A run the program, B write the algorithm, C match the blocks, D break the task into parts.