OCR J277 GCSE Computer Science · 2.1 Algorithms
Stretch tasks Computational Thinking
Quiz Challenge
A quiz game against four computer players, then short and long written answers.
- Quiz Blitz12 questions against the clock
- Quick Fire4 short answers
- Big Think2 long answers
About 20 minutes
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
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
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
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
What is decomposition?
- Testing every part of a program
- Converting a program to binary
- Breaking a problem into smaller sub-problems
- Removing unnecessary detail
A satnav map leaves out what the buildings look like. Which skill is that?
- Abstraction
- Decomposition
- Algorithmic thinking
- Iteration
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
Abstraction and decomposition mean the same thing.
- True
- False
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
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
What name is given to working out the steps to solve a problem and putting them in order?
An algorithm must eventually stop. Which property is this?
- Finite
- Unambiguous
- Complete
- Ordered
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
A detail that is unnecessary for one problem may be essential for another.
- True
- False
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
Explain what is meant by abstraction, using a satnav as an example. [2 marks]
A student is writing a quiz game. Decompose the problem into three sub-problems. [3 marks]
Explain two benefits of decomposition. [2 marks]
State what is meant by algorithmic thinking. [2 marks]
Quiz Challenge, round 3: Big Think
A school wants a program to book parents' evening appointments. Explain how decomposition and abstraction could be used to design it. [6 marks]
Explain why an algorithm must be unambiguous, correctly ordered, complete and finite. [4 marks]
This or That: tick the right answer
Splitting a game into menu, scoring and levels is...
- Abstraction
- Decomposition
A traffic simulation ignores the colour of the cars. That is...
- Abstraction
- Decomposition
Which sub-problem is clearer?
- Check whether the answer is correct
- Do the quiz part
The London Underground map does not show real distances. Which idea does that show?
- Abstraction
- Decomposition
Does the order of steps matter in an algorithm?
- No: the computer sorts them out
- Yes: later steps depend on earlier ones
An algorithm that never stops is not...
- Unambiguous
- Finite
For full marks on abstraction, say what is removed and...
- Why it does not matter
- How long the program is
Which helps several programmers work at once?
- Decomposition
- Abstraction
Memory Match: match each term to its meaning
| Term | Meaning |
|---|---|
| A Abstraction | 1 Ordering the steps to solve a problem |
| B Decomposition | 2 Every step has exactly one meaning |
| C Algorithmic thinking | 3 One smaller piece of a bigger task |
| D Sub-problem | 4 Removing unnecessary detail |
| E Finite | 5 Breaking a problem into smaller parts |
| F Unambiguous | 6 An algorithm that eventually stops |
Sort It: tick one box in each row
Abstraction, decomposition or algorithmic thinking?
| Statement | Abstraction | Decomposition | Algorithmic 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
- Removing unnecessary detail to focus on what matters The skill is deciding what is unnecessary for this particular problem.
- Breaking a problem into smaller sub-problems Each sub-problem is easier to solve, and the solutions are then combined.
- Abstraction The look of a building does not help find a route, so it is removed.
- Road lengths; One-way streets Distances, junctions and one-way systems decide the route. The rest is noise.
- False Abstraction removes detail. Decomposition splits the problem up.
- 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.
- 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.
- algorithmic thinking Algorithmic thinking turns a decomposed problem into steps a computer can run.
- Finite An algorithm that never stops never gives an answer.
- The material does not affect the legal moves Abstraction keeps only the details that affect the problem.
- True The weather does not matter to a satnav, but it is everything to a weather app.
- 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 answerAbstraction 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 answerLoad 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 answerEach 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 answerAlgorithmic 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 answerDecomposition 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 answerAn 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
- Decomposition Breaking a problem into smaller parts is decomposition.
- Abstraction Colour does not affect traffic flow, so the detail is removed.
- Check whether the answer is correct A good sub-problem is specific enough to write and test on its own.
- Abstraction Passengers need the order of stations and the lines, not the real geography.
- Yes: later steps depend on earlier ones A computer follows steps exactly as written, so order is part of the algorithm.
- Finite Finite means it eventually stops.
- Why it does not matter The mark is for explaining why the removed detail is not needed.
- 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
- Algorithmic thinking Checking that every step has exactly one meaning A good algorithm is unambiguous.
- Algorithmic thinking Making sure the steps eventually stop A good algorithm is finite.
- Decomposition Testing each part of a program on its own Small, separate parts can be tested independently.
- Abstraction A satnav ignores what the buildings look like Removing detail that does not affect the route.
- Abstraction Keeping only the details that matter That is the definition of abstraction.
- Decomposition Giving each part of a project to a different programmer Decomposition lets a team work on separate parts at once.
- Algorithmic thinking Writing the steps to solve a problem in order That is the definition of algorithmic thinking.
- Algorithmic thinking Making sure the kettle boils before the water is poured Putting the steps in the right order.
- Decomposition Splitting a quiz game into loading, asking and scoring Breaking the problem into sub-problems.
- Abstraction An Underground map leaves out real distances Passengers only need the stations and lines.
- Decomposition Breaking a big problem into smaller sub-problems That is the definition of decomposition.
- Abstraction A chess program ignores what the pieces are made of The material has no effect on the legal moves.