Computational thinking: abstraction, decomposition, pattern recognition

Computer Science · Programming fundamentals

Question 1 of 10

0

    What is the difference between an algorithm and a program?

    Stuck? Read the explanation

    Unlocks at a streak of 5 correct answers in a row.

    Print a free worksheet (PDF)

    Embed this practice on your site or class page

    Paste this HTML into your page. Students practise right there; it is free and needs no account.

    Computational thinking: abstraction, decomposition, pattern recognition explained

    Computational thinking is a set of problem-solving skills used before any code is written. The three core skills are abstraction, decomposition and pattern recognition, and exam questions usually ask you to name one of them and apply it to a scenario.

    Abstraction means hiding unnecessary detail so that you focus on what matters. A metro map is an abstraction: it shows stations and lines, not the true distances or streets. Decomposition means breaking a large problem into smaller, manageable sub-problems that can each be solved separately. Pattern recognition means spotting similarities or repeated behaviour, so that one solution can be reused for many cases.

    Memory tips: remember that abstraction hides, decomposition splits and pattern recognition finds repeats. For each exam question, ask which of the three words best describes what the scenario is doing, then write one sentence that names the detail being hidden, the parts being split, or the repeat being reused.

    Worked example

    A cinema booking app must let a customer choose a film, a showing time and a seat, then pay. Decomposition splits the task into four sub-problems: list films, list times, draw seats and take payment. Abstraction means the seat screen shows only free and taken seats, not the wiring behind the screen or the ticket-printing code. Pattern recognition notices that every screen uses the same seat layout, so one procedure that draws a layout can be reused for every showing.

    What you will practise

    89 multiple-choice questions (Easy, Medium, Hard). Each answer is followed by an explanation.

    Example questions

    • What does abstraction mean in computational thinking?
    • Which is the best example of abstraction?
    • What does decomposition mean in computational thinking?
    • What does pattern recognition mean in computational thinking?
    • What is an algorithm?
    • Which programming construct repeats a set of instructions?
    • Which programming construct chooses between two paths depending on a condition?
    • A spam filter learns that many unwanted emails contain the same phrases. Which computational thinking skill is being used?

    …and 81 more.