OCR J277 GCSE Computer Science · 2.1 Algorithms

Stretch tasks Computational Thinking

Task 1

Quiz Challenge

A quiz game against four computer players, then short and long written answers.

  1. Quiz Blitz12 questions against the clock
  2. Quick Fire4 short answers
  3. Big Think2 long answers

About 20 minutes

Task 2

This or That

Pixel the cat asks 8 questions. Each has two answers: pick the right one.

  • Two answers to every question
  • A fish treat for every right answer
  • Streaks win Pixel shades, then a party hat

About 4 minutes

Task 3

Memory Match

Flip the cards two at a time to match each term card to its meaning card.

  • 12 cards: each term has a meaning
  • One peek at every card
  • Combo points for pairs found in a row

6 pairs, about 4 minutes

Task 4

Sort It

Sort each statement into the right box, like the tick-box tables in the exam.

  • 12 cards to sort into 3 boxes
  • Drag a card, tap a box or press its number
  • Combo points for cards sorted in a row

12 cards, about 4 minutes

The games need JavaScript. Every question is below, with the answers at the end.

Read the lesson: Computational Thinking

Computational Thinking: the questions

Quiz Challenge, round 1: Quiz Blitz

  1. What is abstraction?

    • Testing each part of a program
    • Removing unnecessary detail to focus on what matters
    • Breaking a problem into smaller parts
    • Putting steps in the right order
  2. What is decomposition?

    • Testing every part of a program
    • Converting a program to binary
    • Breaking a problem into smaller sub-problems
    • Removing unnecessary detail
  3. A satnav map leaves out what the buildings look like. Which skill is that?

    • Abstraction
    • Decomposition
    • Algorithmic thinking
    • Iteration
  4. Which TWO details must a satnav keep?

    Tick 2.

    • The weather
    • Who lives in each house
    • Road lengths
    • One-way streets
    • The colour of the cars
  5. Abstraction and decomposition mean the same thing.

    • True
    • False
  6. Which TWO are benefits of decomposition?

    Tick 2.

    • It removes the need for testing
    • It makes the CPU run faster
    • It means no planning is needed
    • Parts can be worked on by different people at once
    • Each part can be tested on its own
  7. Put this hot drink algorithm in order.

    Number these 1 to 4.

    • Switch the kettle on
    • Wait until it boils
    • Pour the water into the mug
    • Fill the kettle
  8. What name is given to working out the steps to solve a problem and putting them in order?

  9. An algorithm must eventually stop. Which property is this?

    • Finite
    • Unambiguous
    • Complete
    • Ordered
  10. A chess program stores whose turn it is, but not what the pieces are made of. Why?

    • Decomposition forbids it
    • The material does not affect the legal moves
    • Chess pieces are always plastic
    • The program would crash
  11. A detail that is unnecessary for one problem may be essential for another.

    • True
    • False
  12. Which sub-problem is too vague to be useful?

    • Check whether the answer is correct
    • Display the final score
    • Make the game work
    • Load the questions from a file

Quiz Challenge, round 2: Quick Fire

  1. Explain what is meant by abstraction, using a satnav as an example. [2 marks]

  2. A student is writing a quiz game. Decompose the problem into three sub-problems. [3 marks]

  3. Explain two benefits of decomposition. [2 marks]

  4. State what is meant by algorithmic thinking. [2 marks]

Quiz Challenge, round 3: Big Think

  1. A school wants a program to book parents' evening appointments. Explain how decomposition and abstraction could be used to design it. [6 marks]

  2. Explain why an algorithm must be unambiguous, correctly ordered, complete and finite. [4 marks]

This or That: tick the right answer

  1. Splitting a game into menu, scoring and levels is...

    • Abstraction
    • Decomposition
  2. A traffic simulation ignores the colour of the cars. That is...

    • Abstraction
    • Decomposition
  3. Which sub-problem is clearer?

    • Check whether the answer is correct
    • Do the quiz part
  4. The London Underground map does not show real distances. Which idea does that show?

    • Abstraction
    • Decomposition
  5. Does the order of steps matter in an algorithm?

    • No: the computer sorts them out
    • Yes: later steps depend on earlier ones
  6. An algorithm that never stops is not...

    • Unambiguous
    • Finite
  7. For full marks on abstraction, say what is removed and...

    • Why it does not matter
    • How long the program is
  8. Which helps several programmers work at once?

    • Decomposition
    • Abstraction

Memory Match: match each term to its meaning

TermMeaning
A Abstraction1 Ordering the steps to solve a problem
B Decomposition2 Every step has exactly one meaning
C Algorithmic thinking3 One smaller piece of a bigger task
D Sub-problem4 Removing unnecessary detail
E Finite5 Breaking a problem into smaller parts
F Unambiguous6 An algorithm that eventually stops

Sort It: tick one box in each row

Abstraction, decomposition or algorithmic thinking?

StatementAbstractionDecompositionAlgorithmic thinking
Checking that every step has exactly one meaning
Making sure the steps eventually stop
Testing each part of a program on its own
A satnav ignores what the buildings look like
Keeping only the details that matter
Giving each part of a project to a different programmer
Writing the steps to solve a problem in order
Making sure the kettle boils before the water is poured
Splitting a quiz game into loading, asking and scoring
An Underground map leaves out real distances
Breaking a big problem into smaller sub-problems
A chess program ignores what the pieces are made of
Answers

Round 1: Quiz Blitz

  1. Removing unnecessary detail to focus on what matters The skill is deciding what is unnecessary for this particular problem.
  2. Breaking a problem into smaller sub-problems Each sub-problem is easier to solve, and the solutions are then combined.
  3. Abstraction The look of a building does not help find a route, so it is removed.
  4. Road lengths; One-way streets Distances, junctions and one-way systems decide the route. The rest is noise.
  5. False Abstraction removes detail. Decomposition splits the problem up.
  6. Parts can be worked on by different people at once; Each part can be tested on its own Smaller parts are easier to understand, share out, test and reuse.
  7. Fill the kettle → Switch the kettle on → Wait until it boils → Pour the water into the mug Order is not decoration: you cannot pour before the kettle boils.
  8. algorithmic thinking Algorithmic thinking turns a decomposed problem into steps a computer can run.
  9. Finite An algorithm that never stops never gives an answer.
  10. The material does not affect the legal moves Abstraction keeps only the details that affect the problem.
  11. True The weather does not matter to a satnav, but it is everything to a weather app.
  12. Make the game work A useful sub-problem is small and specific enough to write and test on its own.

Round 2: Quick Fire

    • Abstraction is removing unnecessary detail
    • A satnav keeps the roads and junctions but leaves out buildings, because they do not affect the route
    Model answer

    Abstraction is removing unnecessary detail so you can focus on what matters. A satnav keeps the roads, junctions and distances, but leaves out what the buildings look like, because that does not help find a route.

    • Load the questions from a file
    • Display each question and its options
    • Accept and validate the player's answer
    • Check whether the answer is correct
    • Keep and update the score
    • Move on, and show the final result
    Model answer

    Load the questions from a file. Accept and validate the player's answer. Keep and update the score.

    • Each part is easier to understand and solve
    • Different people can work on parts at the same time
    • Each part can be tested on its own
    • Parts can be reused in other programs
    Model answer

    Each part is easier to understand than the whole problem, and each part can be tested on its own, so bugs are easier to find.

    • Identifying the steps needed to solve a problem
    • And putting them in the correct order
    Model answer

    Algorithmic thinking is identifying the steps needed to solve a problem and putting them in the correct order.

Round 3: Big Think

    • Decomposition breaks the problem into smaller sub-problems
    • Sensible sub-problems, such as logging in, showing free slots and confirming
    • Each part can be written and tested separately, possibly by different people
    • Abstraction removes unnecessary detail
    • It keeps what matters, such as teachers, rooms and time slots
    • It leaves out what does not matter, such as what the teachers look like
    • This makes the program simpler and quicker to build
    Model answer

    Decomposition breaks the problem into smaller sub-problems, such as logging in, showing each teacher's free slots, choosing a time, confirming the appointment by email and letting parents cancel. Each part can be written and tested separately, possibly by different people. Abstraction removes unnecessary detail: the program needs each teacher's name, room and time slots, and the student's name, but not what the teachers look like or the colour of the classrooms. That makes the program simpler and quicker to build, because it can focus on what matters.

    • Unambiguous: every step has exactly one meaning, so it cannot be misread
    • Ordered: steps that depend on earlier results must come after them
    • Complete: no steps are missing
    • Finite: it must eventually stop
    Model answer

    An algorithm must be unambiguous, so every step has exactly one meaning and cannot be misinterpreted. It must be correctly ordered, because steps that depend on earlier results have to come after them, such as pouring the water only after the kettle boils. It must be complete, with no missing steps, or the task will not be finished. And it must be finite: it has to stop eventually rather than running forever.

This or That

  1. Decomposition Breaking a problem into smaller parts is decomposition.
  2. Abstraction Colour does not affect traffic flow, so the detail is removed.
  3. Check whether the answer is correct A good sub-problem is specific enough to write and test on its own.
  4. Abstraction Passengers need the order of stations and the lines, not the real geography.
  5. Yes: later steps depend on earlier ones A computer follows steps exactly as written, so order is part of the algorithm.
  6. Finite Finite means it eventually stops.
  7. Why it does not matter The mark is for explaining why the removed detail is not needed.
  8. Decomposition Separate sub-problems can be shared out across a team.

Memory Match

  • A 4 Abstraction: Removing unnecessary detail
  • B 5 Decomposition: Breaking a problem into smaller parts
  • C 1 Algorithmic thinking: Ordering the steps to solve a problem
  • D 3 Sub-problem: One smaller piece of a bigger task
  • E 6 Finite: An algorithm that eventually stops
  • F 2 Unambiguous: Every step has exactly one meaning

Sort It

  1. Algorithmic thinking Checking that every step has exactly one meaning A good algorithm is unambiguous.
  2. Algorithmic thinking Making sure the steps eventually stop A good algorithm is finite.
  3. Decomposition Testing each part of a program on its own Small, separate parts can be tested independently.
  4. Abstraction A satnav ignores what the buildings look like Removing detail that does not affect the route.
  5. Abstraction Keeping only the details that matter That is the definition of abstraction.
  6. Decomposition Giving each part of a project to a different programmer Decomposition lets a team work on separate parts at once.
  7. Algorithmic thinking Writing the steps to solve a problem in order That is the definition of algorithmic thinking.
  8. Algorithmic thinking Making sure the kettle boils before the water is poured Putting the steps in the right order.
  9. Decomposition Splitting a quiz game into loading, asking and scoring Breaking the problem into sub-problems.
  10. Abstraction An Underground map leaves out real distances Passengers only need the stations and lines.
  11. Decomposition Breaking a big problem into smaller sub-problems That is the definition of decomposition.
  12. Abstraction A chess program ignores what the pieces are made of The material has no effect on the legal moves.