Turning an Algorithm into an App (2/2)
Computing: Year 5 & 6 National Curriculum, topic 4.1.6
Turning an Algorithm into an App
You need to follow a few more steps to complete your app.

Event and Control blocks
- You then need to add blocks of code called 'Event and Control blocks'.
- Event and Control blocks give ‘if … then’ and ‘repeat until…’ instructions.
,w_800.png)
Examples
- Event and Control blocks control the following in the basketball game:
- What happens if the mouse is moved? → the red block moves.
- What happens if the ball touches a wall or the hand? → the ball bounces.

Other examples
- Event and Control blocks control the following in the basketball game:
- What happens if the ball touches each ‘basket’? → the score of the shooting team goes up.
- When does the game end? → first team to get to 5 points.
,w_800.png)
Variables blocks
- Blocks of code that create variables are called variable blocks.
- Variables are things that can change.
- Variable blocks of code give instructions for the selection of:
- the colour, time, distance, the angle of bounces, etc.
Test yourself on Turning an Algorithm into an App (2/2)
What kind of blocks give ‘if … then’ and ‘repeat until…’ instructions?
What blocks tell the game what to do when something happens or needs repeating?
What kind of instructions do Event and Control blocks give?