Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1sub-problem | ABreaking a big problem into smaller sub-problems so that it becomes manageable | |
| 2decomposition | BPROCEDURE CalculateAverage() Average ← Total / Count ENDPROCEDURE | |
| 3Solve one small part at a time instead of the whole problem at once | CA small part of a bigger problem that is easier to understand and solve than the whole problem | |
| 4A mistake is easier to find because you only need to check one small sub-problem | DCALL EnterScores() CALL CalculateAverage() CALL ShowResult() | |
| 5Write the whole 500-line program in one go and then test it | EThis tries to solve the whole problem at once, which feels overwhelming and makes it hard to understand. It should be split into sub-problems and each part solved in turn. | |
| 6The program gives the wrong answer, so check every line of the whole program | FWith one big block of code the error could be anywhere. With sub-problems you check each small part and find the faulty one quickly. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
sub-problem — A small part of a bigger problem. It is easier to understand and solve than the whole, so splitting a problem up makes it manageable and makes mistakes easier to find.CALL GetMarks()
CALL AddMarks()
CALL ShowResult()PROCEDURE ShowResult()
OUTPUT Total
ENDPROCEDUREFUNCTION AddMarks() RETURNS INTEGER
RETURN Maths + English
ENDFUNCTIONPROCEDURE GetMarks()
INPUT Maths
ENDPROCEDURECALL GetMarks()
OUTPUT Maths
CALL AddMarks()