← IGCSE Computer Science Paper 2

Identifying the standard method a problem needs

Words in a problem, like add up, how many, highest, average, find or put in order, that show which standard method to use: totalling, counting, max/min, average, search or sort.

Understanding Identifying the standard method a problem needs in IGCSE Computer Science Paper 2

What it does: 'Highest' is a key word for maximum, which keeps the biggest value seen so far by comparing each score with Max. 'Put in order' is a key phrase for sorting, and bubble sort compares neighbouring items and swaps them. 'Add up' is the key phrase for totalling: a running Total starts at 0 and each price is added to it. 'How many' means counting. Add 1 to a Count each time the condition is met. Totalling would add the marks themselves. 'Highest' (or largest, greatest) points to the maximum. 'Lowest' or 'smallest' would point to the minimum. 'Average' and 'mean' signal an average: total the values, count them, then divide the total by the count.

Common mistakes: The key words 'add up' mean totalling, so each price must be added to Total. Adding 1 would count the items instead. It should be Total ← Total + Price[i]. The key word 'highest' points to the maximum method, which keeps the largest value seen so far. Totalling adds values together. It should be '// Method: maximum'.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 296–306) and word search (Modules 296–316).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A problem says: 'Add up the prices of all 30 items in a basket.' Which standard method does it need?
TotallingCounting
Matches
'How many students passed?' → Total ← Total + Mark
↓
'How many' is a key phrase for counting, not totalling. It should use Count ← Count + 1.
Applying
Meanings
Term
key words
Meaning
Words in a problem, like add up, how many, highest, average, find or put in order, that show which standard method to use: totalling, counting, max/min, average, search or sort.
Practice
// add up -> totalling
Testing
Gaps
Total ← Total Mark
Check Answer
Spots
3FOR i ← 1 TO 10
4 Total ← Total + 1

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Anglerfish' badge — Deep Diver, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A problem says: 'Add up the prices of all 30 items in a basket.' Which standard method does it need?
A. Totalling ✓
B. Counting
'Add up' is the key phrase for totalling: a running Total starts at 0 and each price is added to it.
2. A problem says: 'Find how many students scored above 50.' Which standard method does it need?
A. Totalling
B. Counting ✓
'How many' means counting. Add 1 to a Count each time the condition is met. Totalling would add the marks themselves.
3. A problem says: 'Output the highest temperature recorded in a week.' Which method does it need?
A. Finding the maximum ✓
B. Finding the minimum
'Highest' (or largest, greatest) points to the maximum. 'Lowest' or 'smallest' would point to the minimum.
4. Which key word tells you a problem needs a calculation of the average?
A. 'mean' or 'average' mark ✓
B. 'lowest' mark
'Average' and 'mean' signal an average: total the values, count them, then divide the total by the count.
5. A problem says: 'Check whether the name Zoe is in a list of 20 names.' Which method does it need?
A. Bubble sort
B. Linear search ✓
'Check whether it is in' and 'find' signal a search. Linear search checks each item in turn against the target.

Match the Pairs

Total ← Total + Mark → Matches problems with key words like 'add up' or 'sum': use totalling
Count ← Count + 1 → Matches problems with key words like 'how many': use counting
A problem asking for the 'highest' score needs the maximum method → IF Score > Max THEN Max ← Score
A problem that says 'put in order' needs a bubble sort → IF Marks[i] > Marks[i + 1] THEN swap
'How many students passed?' → Total ← Total + Mark → 'How many' is a key phrase for counting, not totalling. It should use Count ← Count + 1.
'Put the marks in order' → linear search → 'Put in order' is a key phrase for sorting, not searching. It needs a bubble sort.

Key Term

key words
Words in a problem, like add up, how many, highest, average, find or put in order, that show which standard method to use: totalling, counting, max/min, average, search or sort.

Fill in the Blanks

1. // add up all the marks Total ← Total + Mark
Hint: The key words are 'add up', so totalling. Type the arithmetic operator that builds the running total.
2. // how many students scored over 50 Count ← Count + 1
Hint: The key words are 'how many', so counting. Type the number added to the counter each time.
3. IF Mark < Lowest THEN Lowest ← Mark ENDIF
Hint: The problem says 'lowest', so finding the minimum. Type the comparison operator that checks for a smaller value.
4. // find a mark in the list Found ← FALSE FOR Index ← 1 TO 10
Hint: The key word is 'find', so linear search. Type the starting value of the flag before the search begins.
5. // put the marks in order IF Marks[I] > Marks[I + 1] THEN Temp ← Marks[I]
Hint: The key words are 'put in order', so a bubble sort. Type the name of the temporary variable that holds a value during a swap.

Spot the Error

Question 1
A // Add up all the prices
B Total ← 0
C FOR i ← 1 TO 10
D Total ← Total + 1
E NEXT i
Line D — The key words 'add up' mean totalling, so each price must be added to Total. Adding 1 would count the items instead. It should be Total ← Total + Price[i].
Question 2
A // Problem: highest mark
B // Method: totalling
C Max ← Mark[1]
Line B — The key word 'highest' points to the maximum method, which keeps the largest value seen so far. Totalling adds values together. It should be '// Method: maximum'.
Question 3
A // How many pupils passed
B IF Mark >= 50 THEN
C Count ← Count + Mark
D ENDIF
Line C — 'How many' means counting, so Count must go up by 1 each time the condition is true. Adding Mark would total the marks. It should be Count ← Count + 1.
Question 4
A // Highest of 10 marks
B // Step 1: total the marks
C // Step 2: divide by count
Line A — The steps total the marks and then divide, which is the average method. The key word in the problem should be 'average', not 'highest'. It should be '// Average of 10 marks'.
Question 5
A // Find a name in a list
B // Method: bubble sort
C Found ← FALSE
Line B — The key word 'find' means searching for an item, so the method is linear search. Bubble sort puts items in order. It should be '// Method: linear search'.

Student with a class code? Join your class →