Lesson 1 · Computational thinking

🧩 Decomposition & Patterns

Big problems feel scary. Computer scientists break them into small pieces and look for things that repeat.

✂️ Decomposition

Decomposition means breaking a big problem into smaller parts that are easier to solve one at a time.

Problem: make a quiz game ├─ show a question ├─ get the player’s answer ├─ check if it is right ├─ add to the score └─ show the final score

🖼️ See it

Decomposing “make a quiz game”Show questiontext on screenGet answerplayer typesCheck answerright or wrong?Update scoreadd 1 if rightFinal scoreshow at the endQuiz game
Each small part is easy to program and test on its own.

🔁 Patterns and abstraction

Pattern recognition means spotting parts that are the same or repeat, so you can solve them once and reuse the solution. Abstraction means ignoring details that do not matter.

Drawing a square: forward 50, turn 90 (×4) The pattern repeats 4 times → use a loop A map of the bus route shows stops and lines, not every tree and house → abstraction
Decompose first, then look for patterns in the parts.

🪜 Step by step: decomposing a problem

Break a big problem into small parts.

Problem: break down 'make a school poster'.

  1. List the parts. Title, picture, text, colours.
  2. Order them.
  3. Solve one at a time.

Answer: title, picture, text, colours.

Remember: patterns repeat. Spot them and reuse the answer.
✏️ Quick check · 1 of 6
Meaning

Decomposition means:

Break it up.
✏️ Quick check · 2 of 6
Pattern

Which shows pattern recognition?

What repeats?
✏️ Quick check · 3 of 6
Abstraction

A metro map leaves out buildings and trees. This is:

Ignore details.
✏️ Quick check · 4 of 6
Parts

Which is a sensible sub-problem of “make a birthday party”?

A small piece.
✍️ Type your answer · 5 of 6

A hexagon is drawn by repeating “forward 40, turn 60”.

How many times is the pattern repeated?

Enter an exact answer, without rounding.
Count the sides.
✍️ Type your answer · 6 of 6

A big task is split into 4 parts, and each part into 3 smaller steps.

Decomposition4 parts3 steps each4 × 3 = ? steps

How many small steps are there?

Enter an exact answer, without rounding.
Multiply.
📝 Lesson quiz · 5 questions
0 / 5
Re-read the lesson, then give it another go.
Question 1 of 5

Why do programmers decompose problems?

Question 2 of 5

Spotting the same steps used again and again is:

Question 3 of 5

Leaving out unimportant details is:

Question 4 of 5

Which is NOT part of computational thinking?

Question 5 of 5

A repeating pattern in a program can be written as a: