Identifying the standard method a problem needs

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Identifying the standard method a problem needs

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

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
2. A problem says: 'Find how many students scored above 50.' Which standard method does it need?
A Totalling
B Counting
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
4. Which key word tells you a problem needs a calculation of the average?
A 'mean' or 'average' mark
B 'lowest' mark
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

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

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

Definitions

key words

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
// add up all the marks Total ← Total _ Mark
2.
// how many students scored over 50 Count ← Count + _
3.
IF Mark _ Lowest THEN Lowest ← Mark ENDIF
4.
// find a mark in the list Found ← _____ FOR Index ← 1 TO 10
5.
// put the marks in order IF Marks[I] > Marks[I + 1] THEN ____ ← Marks[I]

Spot the Error

Shade in the letter of the line that contains an 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
Question 2
A // Problem: highest mark
B // Method: totalling
C Max ← Mark[1]
Question 3
A // How many pupils passed
B IF Mark >= 50 THEN
C Count ← Count + Mark
D ENDIF
Question 4
A // Highest of 10 marks
B // Step 1: total the marks
C // Step 2: divide by count
Question 5
A // Find a name in a list
B // Method: bubble sort
C Found ← FALSE

Answer Key

Identifying the standard method a problem needs
Section A: Quick Questions
Q1
A — Totalling
Q2
B — Counting
Q3
A — Finding the maximum
Q4
A — 'mean' or 'average' mark
Q5
B — Linear search
Section B: Match the Pairs
Q1
Total ← Total + Mark → Matches problems with key words like 'add up' or 'sum': use totalling
Q2
Count ← Count + 1 → Matches problems with key words like 'how many': use counting
Q3
A problem asking for the 'highest' score needs the maximum method → IF Score > Max THEN Max ← Score
Q4
A problem that says 'put in order' needs a bubble sort → IF Marks[i] > Marks[i + 1] THEN swap
Q5
'How many students passed?' → Total ← Total + Mark → 'How many' is a key phrase for counting, not totalling. It should use Count ← Count + 1.
Q6
'Put the marks in order' → linear search → 'Put in order' is a key phrase for sorting, not searching. It needs a bubble sort.
Section C: Definitions
Q1
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.
Section D: Fill in the Blanks
Q1
// add up all the marks Total ← Total + Mark
Q2
// how many students scored over 50 Count ← Count + 1
Q3
IF Mark < Lowest THEN Lowest ← Mark ENDIF
Q4
// find a mark in the list Found ← FALSE FOR Index ← 1 TO 10
Q5
// put the marks in order IF Marks[I] > Marks[I + 1] THEN Temp ← Marks[I]
Section E: Spot the Error
Q1
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].
Q2
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'.
Q3
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.
Q4
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'.
Q5
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'.