AQA 8525 GCSE Computer Science · 3.1 Fundamentals of 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.
- 10 cards to sort into 2 boxes
- Drag a card, tap a box or press its number
- Combo points for cards sorted in a row
10 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
How does AQA define an algorithm?
- A program written in Python
- A diagram of a computer system
- A sequence of steps that can be followed to complete a task
- A set of instructions only a computer can follow
An algorithm must involve a computer.
- True
- False
What is the relationship between an algorithm and a program?
- A program is an implementation of an algorithm
- An algorithm is an implementation of a program
- They are exactly the same thing
- A program is a diagram of an algorithm
What is abstraction?
- Testing each part separately
- Removing unnecessary detail so only what is needed remains
- Breaking a problem into sub-problems
- Writing an algorithm in Python
A bus fare program stores a passenger's age but not their hair colour. Which skill is that?
- Decomposition
- Iteration
- Selection
- Abstraction
Which TWO are benefits of decomposition?
Tick 2.
- It removes the need for testing
- The program needs no subroutines
- The CPU runs faster
- Work can be split between programmers
- Errors are easier to find
The same algorithm can be written in Python, in C#, or as a flowchart.
- True
- False
What name is given to breaking a problem into smaller sub-problems?
Which detail does a bus fare calculation need?
- The colour of the bus
- The zones travelled
- The passenger's shoe size
- The passenger's favourite band
Which TWO are benefits of abstraction?
Tick 2.
- The program is simpler to write
- It uses less memory
- It adds more detail
- It needs more data
- It makes the program harder to change
Why design the algorithm before writing the code?
- Computers cannot run code without one
- It makes the code shorter
- Python requires it
- You can check it works before writing any code
Each sub-problem of a decomposed problem often becomes...
- A subroutine
- A variable
- A comment
- A file
Quiz Challenge, round 2: Quick Fire
Define the term algorithm, and explain how an algorithm differs from a program. [2 marks]
Explain why decomposing a problem helps a team of programmers. [2 marks]
Give an example of abstraction in a bus fare program, and say why it helps. [2 marks]
State two benefits of abstraction. [2 marks]
Quiz Challenge, round 3: Big Think
A cinema wants a program to sell tickets online. Explain how decomposition and abstraction could be used to design it. [6 marks]
Explain the difference between an algorithm and a program, and why programmers design the algorithm first. [4 marks]
This or That: tick the right answer
Is a cake recipe an algorithm?
- No: it does not use a computer
- Yes: it is a sequence of steps
When planning a solution, which should come first?
- The algorithm
- The program
A tube map straightens every line. What is that?
- Abstraction
- Decomposition
Which phrase earns the definition mark for an algorithm?
- A sequence of steps
- Instructions for a computer
Splitting a quiz game into loading, asking and scoring is...
- Abstraction
- Decomposition
An answer says abstraction just removes detail. What is missing?
- Which detail, and why it does not matter
- The name of the programmer
Which makes errors easier to find?
- Decomposing into small routines
- Writing one long program
The same fare model works for another city. What does that show abstraction gives?
- A more general solution
- A more detailed solution
Memory Match: match each term to its meaning
| Term | Meaning |
|---|---|
| A Algorithm | 1 Removing unnecessary detail |
| B Program | 2 Breaking a problem into sub-problems |
| C Decomposition | 3 A sequence of steps to complete a task |
| D Abstraction | 4 Having only one possible meaning |
| E Unambiguous | 5 A smaller, self-contained task |
| F Sub-problem | 6 An algorithm in a programming language |
Sort It: tick one box in each row
Abstraction or decomposition?
| Statement | Abstraction | Decomposition |
|---|---|---|
| A fare program that ignores hair colour | ||
| A model that works for any city because it ignores local detail | ||
| Leaving out detail that would make a map harder to use | ||
| A tube map with invented distances | ||
| Keeping only the information needed to solve the problem | ||
| Breaking a problem into parts that can be tested on their own | ||
| Turning each part of a problem into a subroutine | ||
| Splitting a quiz game into eight smaller tasks | ||
| Giving each programmer a different part to write | ||
| Turning one huge job into a list of twenty-minute jobs |
Answers
Round 1: Quiz Blitz
- A sequence of steps that can be followed to complete a task Learn that wording: mark schemes accept a sequence of steps, not instructions for a computer.
- False A recipe, or the steps for changing a tyre, is an algorithm too.
- A program is an implementation of an algorithm The algorithm is the method. The program is that method in a language a machine can run.
- Removing unnecessary detail so only what is needed remains The tube map throws away real distances because passengers do not need them.
- Abstraction Hair colour does not affect the fare, so the detail is removed.
- Work can be split between programmers; Errors are easier to find Smaller sub-problems can also be solved, tested and reused on their own.
- True Each is a different implementation or representation of the same method.
- decomposition Each sub-problem is easier to solve than the whole.
- The zones travelled Age, zones and whether they hold a pass decide the fare. Everything else is discarded.
- The program is simpler to write; It uses less memory Less to represent means simpler, faster code that is easier to maintain.
- You can check it works before writing any code Tracing a plan takes minutes. Debugging an unplanned program takes an afternoon.
- A subroutine That is why decomposition and structured programming are the same idea in different clothes.
Round 2: Quick Fire
- An algorithm is a sequence of steps to complete a task
- A program is an implementation of it in a programming language
Model answerAn algorithm is a sequence of steps that can be followed to complete a task. A program is an implementation of an algorithm, written in a programming language so a computer can run it.
- Each sub-problem is simpler, so it can be solved and tested separately
- The work can be split between programmers at the same time
Model answerEach sub-problem is simpler than the whole, so it can be solved and tested separately, and the sub-problems can be shared between the programmers so they work at the same time.
- Names a detail that is removed, such as hair colour
- It makes the program simpler, faster or use less memory
Model answerThe program ignores each passenger's hair colour and name, keeping only their age, zones and pass. That makes the program simpler to write, and it uses less memory.
- The program is simpler to write
- It runs faster and uses less memory
- It is easier to understand and maintain
- The solution is more general
Model answerThe program is simpler to write, and it uses less memory because less data is stored.
Round 3: Big Think
- Decomposition breaks the problem into smaller sub-problems
- Sensible sub-problems, such as choosing seats and taking payment
- Each becomes a subroutine that can be written and tested separately
- Abstraction removes unnecessary detail
- It keeps what matters, such as films, times, seats and prices
- It removes what does not, such as what customers look like
- So the program is simpler and uses less memory
Model answerDecomposition breaks the problem into smaller sub-problems: showing the films and times, choosing seats, taking payment and emailing a confirmation. Each sub-problem becomes a subroutine that can be written and tested separately, and the work can be shared between programmers. Abstraction removes unnecessary detail: the program needs each film, its showing times, the seat numbers and the prices, but not what the customers look like or the colour of the cinema carpet. That makes the program simpler to write, and it uses less memory.
- An algorithm is a sequence of steps to complete a task
- It need not involve a computer, like a recipe
- A program is an implementation in a programming language
- Designing first means it can be checked, by tracing, before any code is written
- Which saves debugging time
Model answerAn algorithm is a sequence of steps that can be followed to complete a task, and it need not involve a computer at all: a recipe is an algorithm. A program is an implementation of an algorithm in a programming language. Designing the algorithm first means it can be checked by tracing it on paper before any code is written, which saves hours of debugging later.
This or That
- Yes: it is a sequence of steps An algorithm is a sequence of steps to complete a task. No computer is needed.
- The algorithm Design and check the method, then implement it as a program.
- Abstraction Passengers only need the order of stations, so the true shapes are thrown away.
- A sequence of steps Mark schemes accept a sequence of steps, and are far less generous with vaguer phrases.
- Decomposition Breaking the problem into smaller sub-problems is decomposition.
- Which detail, and why it does not matter Name a specific detail that has gone and say why it is not needed.
- Decomposing into small routines A fault then shows up inside one small routine instead of somewhere in a thousand lines.
- A more general solution Built only on the essentials, a solution fits many situations.
Memory Match
- A 3 Algorithm: A sequence of steps to complete a task
- B 6 Program: An algorithm in a programming language
- C 2 Decomposition: Breaking a problem into sub-problems
- D 1 Abstraction: Removing unnecessary detail
- E 4 Unambiguous: Having only one possible meaning
- F 5 Sub-problem: A smaller, self-contained task
Sort It
- Abstraction A fare program that ignores hair colour Detail that does not affect the fare is removed.
- Abstraction A model that works for any city because it ignores local detail Abstraction makes a solution more general.
- Abstraction Leaving out detail that would make a map harder to use Removing detail is abstraction.
- Abstraction A tube map with invented distances Real distances are thrown away because passengers do not need them.
- Abstraction Keeping only the information needed to solve the problem That is the definition of abstraction.
- Decomposition Breaking a problem into parts that can be tested on their own Separate parts can be tested separately.
- Decomposition Turning each part of a problem into a subroutine Each sub-problem maps onto a subroutine.
- Decomposition Splitting a quiz game into eight smaller tasks Breaking a problem up is decomposition.
- Decomposition Giving each programmer a different part to write Decomposition lets work be shared out.
- Decomposition Turning one huge job into a list of twenty-minute jobs Smaller sub-problems are easier to solve.