Paper 1 Algorithmic Representation Answers
These answers correspond to Paper 1 Algorithmic Representation Drills.
Answer 1: Flowchart Symbols
| Operation | Symbol |
|---|---|
| Begin the algorithm | terminator / rounded rectangle / oval |
Input mark | input-output / parallelogram |
Calculate total <- total + mark | process / rectangle |
Test mark >= 50? | decision / diamond |
Mark points:
- begin/end uses a terminator;
- input/output uses a parallelogram;
- calculation uses a process rectangle;
- condition test uses a decision diamond.
Common weak answer:
- using a decision diamond for every step. Only a branch condition should use a decision symbol.
Answer 2: Selection Trace
For score = 83:
score >= 75isTrue;- the first branch is taken;
- output is
Distinction.
For score = 47:
score >= 75isFalse;score >= 50isFalse;- the
ELSEbranch is taken; - output is
Fail.
Mark points:
- for
83, shows thatscore >= 75isTrue; - for
83, states that the first branch producesDistinction; - for
47, shows that both tested conditions areFalse; - for
47, states that theELSEbranch producesFail.
Common weak answer:
- running all branches. In an
IF...ELSE IF...ELSEstructure, the first true branch is selected and the rest are skipped.
Answer 3: Fixed-Count Iteration Trace
| Iteration | count after update | total after update |
|---|---|---|
| 1 | 2 | 2 |
| 2 | 3 | 6 |
| 3 | 4 | 12 |
| 4 | 5 | 20 |
After iteration 4, count <= 4 is false because count is 5. The final output is:
20Mark points:
- starts with
count = 1,total = 0; - total values
2,6,12,20; - count values after update
2,3,4,5; - loop stops when
count <= 4becomes false; - final output is
20.
Common weak answer:
- adding
countinstead ofcount * 2.
Answer 4: Sentinel-Controlled Iteration
| Input read | Is input the sentinel? | total after this input is processed |
|---|---|---|
| 12 | No | 12 |
| 8 | No | 20 |
| 15 | No | 35 |
| -1 | Yes | 35 |
| 100 | Not read by the loop | 35 |
Final output:
35Mark points:
- identifies
-1as the sentinel; - adds
12,8, and15; - does not add
-1; - stops as soon as
-1is read; - ignores
100because it appears after the sentinel; - states the final output
35.
Common weak answer:
- adding every value in the written input sequence. A sentinel value stops the loop, so later values are not processed.
Answer 5: Decision Table
| logged_in | quiz_open | attempts_left | Action |
|---|---|---|---|
| True | True | True | start quiz |
| True | True | False | deny quiz |
| True | False | True | deny quiz |
| True | False | False | deny quiz |
| False | True | True | deny quiz |
| False | True | False | deny quiz |
| False | False | True | deny quiz |
| False | False | False | deny quiz |
Mark points:
- includes all eight combinations for three Boolean conditions;
- identifies that all three conditions must be true;
- allows only the all-true row;
- denies every row with
logged_in = False; - denies every row with
quiz_open = False; - denies every row with
attempts_left = False.
Common weak answer:
- allowing the quiz when two of the three conditions are true. The rule says all three are required.
Answer 6: Pseudocode Meaning
- Sequence:
total <- 0followed by the next statement, or the ordered input/update/output steps. - Selection:
IF hours > 0 THEN ... ENDIF. - Iteration:
FOR day <- 1 TO 3 ... NEXT day.
Mark points:
- correctly identifies sequence;
- correctly identifies selection;
- correctly identifies iteration.
Common weak answer:
- calling any statement an iteration. Iteration means repetition controlled by a loop.
Answer 7: Validation Logic Correction
The condition mark > 0 AND mark < 100 wrongly rejects 0 and 100, even though percentage marks usually include both endpoints.
Corrected condition:
mark >= 0 AND mark <= 100Mark points:
- identifies that
0is wrongly rejected; - identifies that
100is wrongly rejected; - gives the corrected lower-bound comparison
mark >= 0; - gives the corrected upper-bound comparison
mark <= 100.
Common weak answer:
- changing
ANDtoOR. The conditionmark >= 0 OR mark <= 100would accept almost every number.
Answer 8: Input Validation Representation
One valid pseudocode answer:
INPUT mark
WHILE mark is not an integer OR mark < 0 OR mark > 100
OUTPUT "Invalid mark"
INPUT mark
ENDWHILE
OUTPUT "Accepted"Mark points:
- inputs the first mark before the loop;
- uses a loop for repeated input;
- rejects non-integer input;
- rejects values below
0; - rejects values above
100, so only integers from0to100inclusive are accepted.
Common weak answer:
- checking only
mark < 0 OR mark > 100. That handles the range but does not reject non-integer input.
Answer 9: Modular Decomposition
One suitable decomposition:
| Module | Responsibility |
|---|---|
read_booking_request | get a booking request from the user |
validate_request | check that the date and time are valid |
display_booking_summary | output the accepted bookings clearly |
Another valid design could include a separate store_booking module instead of combining storage with validation or input.
Mark points:
- gives three sensible modules;
- each module has a clear responsibility;
- includes user input;
- includes validation of date/time;
- includes storing or managing accepted requests;
- includes summary output.
Common weak answer:
- using module names such as
part1,part2, andpart3. Module names should describe responsibilities.
Answer 10: Representation Choice
| Task | Representation and reason |
|---|---|
| show the step-by-step logic for calculating an average from a list | pseudocode, because it shows ordered algorithm steps compactly |
| check every combination of age group, membership status, and voucher availability before choosing a discount action | decision table, because combinations of conditions determine the action |
| show a visual overview of a login loop with a retry decision | flowchart, because branches and loop-back paths are visible |
| split a larger event-registration system into smaller responsibilities | modular decomposition, because it separates the system into subtasks |
Mark points:
- chooses pseudocode for the average algorithm with a suitable reason;
- chooses decision table for the multi-condition discount decision with a suitable reason;
- chooses flowchart for the login loop with a suitable reason;
- chooses modular decomposition for the larger system with a suitable reason.
Common weak answer:
- choosing the same representation for every task without linking the choice to what must be communicated.