Block-based programming
Block-based languages such as Scratch let you build programs by snapping blocks together. You cannot make spelling mistakes, so you can focus on the logic.
Events and sequence
The blocks underneath run in order, top to bottom: that is sequence.
Motion blocks move a sprite: move (10) steps, turn (15) degrees.
Loops
forever runs them again and again until the program is stopped.
To draw a square with the pen: repeat (4) { move (100) steps, turn (90) degrees }.
For any regular shape, the turn is 360 ÷ number of sides.
Decisions and variables
Variables store data, such as a score. Blocks like change [score] by (1) update them.
ask [What is your name?] and wait gets input; the reply is stored in answer.
A sprite should draw a regular pentagon (5 sides). What should go inside the repeat loop?
- A pentagon has 5 sides, so repeat (5).
- Turn = 360 ÷ 5 = 72 degrees.
Answer: repeat (5) { move (100) steps, turn (72) degrees }
Scripts start with an event block. Blocks run in sequence; repeat and forever loop; if blocks make decisions. For a regular shape, turn 360 ÷ sides degrees.
- Sequence
- Instructions carried out one after another, in order.
- AND
- A Boolean operator that gives True (1) only when both inputs are True.
- Program
- A set of instructions written in a programming language that a computer can run.
- Condition
- An expression that is either True or False, such as score > 50, used in if statements and while loops.
- Input
- Data put into a computer, for example from a keyboard, mouse, microphone or sensor.
Try two quick questions
See if it has sunk in. Answers are marked straight away.
2 more questions
Try each one, then tap to check.
How many degrees should a sprite turn each time to draw a regular octagon (8 sides)?
Show the answer
Answer: 45 degrees
The turns add up to 360°: 360 ÷ 8 = 45.
How many degrees should a sprite turn each time to draw a regular square?
Show the answer
Answer: 90 degrees
The turns add up to 360°: 360 ÷ 4 = 90.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.
Facts checked against the sources below, 27 October 2026. Last updated 2 October 2026. Spotted a mistake? Tell us and we will fix it.