Before you write code, you need to think like a problem-solver. Computational thinking is a way of breaking problems down — then you build the solution by snapping together blocks in Scratch.
1Computational thinking
Computational thinking has four key ideas:
| Pillar | Means |
|---|---|
| Decomposition | Break a big problem into smaller, easier parts |
| Pattern Recognition | Spot similarities and things that repeat |
| Abstraction | Focus on the important details, ignore the rest |
| Algorithm Design | Write the step-by-step plan to solve it |
- Computational thinking = decomposition, pattern recognition, abstraction, algorithm design.
- Decompose a big problem into small parts; spot repeating patterns; ignore unimportant details.
- An algorithm is the step-by-step plan to solve the problem.
2Scratch blocks, variables & decisions
Scratch builds programs by snapping coloured blocks together — no typing. You control a sprite (a character) with blocks like move, turn and say.
Variables
A variable stores a value that can change while the program runs — perfect for a game score or a lives counter. Use set and change blocks to update it.
Decisions
Make choices with conditional blocks:
- if-then — do something only when a condition is true.
- if-then-else — do one thing if true, another if false.
if score > 10 then
say "You win!"
else
say "Keep going"
- Scratch snaps coloured blocks together; a sprite is a character you control (move, turn, say).
- A variable stores a changing value (like a game score); set and change blocks update it.
- if-then does something when a condition is true; if-then-else picks between two actions.
3Loops, sensing & games
Loops repeat blocks so you don't drag them many times:
| Loop | Repeats… |
|---|---|
| repeat (n) | A fixed number of times |
| repeat until | Until a condition becomes true |
| forever | Endlessly (great for games) |
Sensing blocks
Sensing blocks let your program react to the player:
- Keyboard — "when space key pressed".
- Mouse — "when this sprite clicked".
- Collisions — "if touching the wall / another sprite".
Put it together — loops + variables + sensing + decisions — and you can build an interactive game or story module.
- repeat (n) loops a fixed number of times; repeat until loops until a condition is true; forever loops endlessly.
- Sensing blocks react to the player: keyboard presses, mouse clicks and collisions (touching).
- Combine loops + variables + sensing + decisions to make an interactive game.
★ Practical: plan a Scratch game
In Scratch (or on paper), plan a simple catch game:
- Use a 'score' variable that starts at 0.
- Use a forever loop so a falling object keeps moving.
- Use a sensing block: if the object touches the player, change score by 1.
- Use if-then-else: if score reaches 10, say 'You win!'.
Ready for the chapter test?
Answer 5 questions. Score 60% or more to mark this chapter complete.
Start the test →💡 Log in to save your progress and earn the certificate.