🧩 Decomposition and patterns
Decomposition means breaking a big problem into smaller parts that are easier to solve. Pattern recognition means spotting things that are the same or repeat, so you can solve them once and reuse the answer.
Before you write a program, you think like a computer scientist: break the problem down, spot patterns and keep only what matters.
Decomposition means breaking a big problem into smaller parts that are easier to solve. Pattern recognition means spotting things that are the same or repeat, so you can solve them once and reuse the answer.
Abstraction means hiding the details you do not need and keeping the ones that matter. A metro map is an abstraction: it shows the stations and the order they come in, not every street and building.
Abstraction means keeping only the details that matter.
Problem: design a map of the underground. What do you keep?
Answer: a simple diagram of stations and lines.
Decomposition means:
Abstraction means:
Spotting that every level of a game works the same way is:
A metro map shows stations but not streets. This is an example of:
Which is the best way to decompose “plan a class party”?
For a program that adds up test scores, which detail is NOT needed?
Which is decomposition?
A recipe that repeats “stir for 1 minute” five times shows a:
Which is an abstraction of a car for a racing game?
Computational thinking happens:
Why is decomposition useful?