CIE IGCSE | TOPIC 8 ASSESSMENT
PROGRAMMING: END OF TOPIC REVIEW
Assess programming concepts, operators, routines, arrays and file handling through recall, applied traces and written explanations. Work independently before revealing feedback.
BEFORE YOU BEGIN
Suggested time: 70–90 minutes, or split into two sessions. Complete sections A and B without notes. Write section C answers in your exercise book before revealing the marking guidance.
Sections A and B provide an automatic score out of 24, one point for each fully correct item. Section C has 34 suggested written marks, assessed separately. These are original practice questions, not an official Cambridge paper or grade boundary.
Use pseudocode and trace tables in your book for the applied tasks. The review samples this large topic; use the revision page and lesson links for full coverage. State assumptions and show working where a question requires it. Your answers remain only while this page is open.
C | EXAM-STYLE WRITING
Write in your exercise book before revealing the guidance. Section C assesses subject knowledge and gives you practice expressing it clearly. The first table reproduces the command-word meanings supplied from the Cambridge syllabus. The second gives practical writing guidance for this review.
| CIE command word | Meaning from the specification |
|---|---|
| Calculate | work out from given facts, figures or information |
| Compare | identify/comment on similarities and/or differences |
| Define | give precise meaning |
| Demonstrate | show how or give an example |
| Describe | state the points of a topic / give characteristics and main features |
| Evaluate | judge or calculate the quality, importance, amount, or value of something |
| Explain | set out purposes or reasons / make the relationships between things clear / say why and/or how and support with relevant evidence |
| Give | produce an answer from a given source or recall/memory |
| Identify | name/select/recognise |
| Outline | set out the main points |
| Show (that) | provide structured evidence that leads to a given result |
| State | express in clear terms |
| Suggest | apply knowledge and understanding to situations where there are a range of valid responses in order to make proposals / put forward considerations |
The command applies to the subject context. A brief identification does not need an essay; an explanation needs accurate links. Use the guidance below for the commands in this written review.
| Command word | What your answer should do | Useful writing pattern |
|---|---|---|
| Describe | State the main features or relevant points; for a process, make the sequence clear. | First… Next… Finally… |
| Explain | Give reasons, purposes or clear relationships, supported by relevant subject knowledge. | …because…; therefore…; resulting in…; leading to… |
| Compare | Identify similarities and/or differences, addressing both things on the same basis. | Both…; whereas…; unlike… |
| Evaluate | Make a reasoned judgement about suitability or value in the given context. | A benefit is…; however…; therefore, for this purpose… |
| Calculate | Work out a result using the supplied data. | Show the relevant values and arithmetic. |
| Show (that) | Provide structured evidence leading to the stated result. | Trace intermediate states, then link them to the result. |
| Suggest | Apply knowledge to propose a valid solution or test. | State a proposal and relate it to the requirement. |
BUILD A CLEAR EXPLANATION
Point → reason or mechanism → consequence. Connectives help show the relationship, but the technical link must be accurate. Adding “because” to an unsupported claim does not make it a good explanation.
Thin answer: “The count changes.”
Developed answer: “The count increases by one only after an input is accepted because rejected attempts must not represent extra accepted scores, therefore invalid retries do not inflate the final count.”
Use because or because of to introduce a cause; therefore, resulting in or leading to to show a consequence. For comparison, use both and whereas. For evaluation, use however and finish with a justified judgement.
Write enough relevant detail for the marks available. Clear, concise sentences are better than padding. These are writing supports, not compulsory phrases or separate official language marks.
25 | TYPES, VALUES AND ASSIGNMENT
[4 suggested marks]
Compare a variable with a constant. Then explain why a student code such as “0072” should use STRING when its leading zeros must be retained.
Both use names to refer to values. A variable may change during execution, whereas a constant stays fixed during that run. A student code identifies someone rather than representing a quantity, so STRING retains its text representation, including leading zeros.
- Shared use of a name: one mark.
- Variable may change during execution: one mark.
- Constant fixed during execution: one mark.
- STRING preserves the required identifier text: one mark.
Writing focus: Address both items on a shared comparison point, then connect the type choice to the requirement.
26 | LOOP CHOICE AND TOTALS
[4 suggested marks]
A program receives four accepted INTEGER scores from zero to twenty. It must retry invalid inputs and calculate their total. Describe suitable outer and inner loops, and explain why Total ← Total + Score belongs after validation while Total ← 0 belongs before the outer loop.
Use an outer FOR for four accepted scores and an inner REPEAT UNTIL the current score is valid. Initialise Total once before the FOR. Add each score after acceptance because invalid attempts must not contribute. The update keeps the total so far and adds the new accepted score.
- Outer loop gives four accepted items: one mark.
- Inner retry retains current item until valid: one mark.
- Initialisation before the outer loop retains earlier contributions: one mark.
- Addition after validation excludes rejected values: one mark.
Writing focus: Use because and therefore to link placement to its effect.
27 | ROUTINES AND SCOPE
[4 suggested marks]
Compare a procedure with a function. Then explain why returning the value of a local variable does not make that variable’s name available to the caller.
Both are named routines that can receive parameters. A procedure performs a task without a function result; a function returns one value used in an expression. RETURN communicates a value, while the local declaration’s scope remains within its routine. The caller may store the result in a separate variable.
- Both named routines and may receive parameters: one mark.
- Procedure has no returned expression result: one mark.
- Function returns a value for its caller: one mark.
- Returned value does not expand the local name’s scope: one mark.
Writing focus: Distinguish the value being communicated from the name used to hold it.
28 | LIBRARY ROUTINES AND RANDOMNESS
[4 suggested marks]
Calculate DIV(17, 5) and MOD(17, 5). Then evaluate the claim that ROUND(RANDOM() * 6, 0) is a fair six-sided die.
DIV returns three and MOD returns two: three groups use fifteen, leaving two. The rounded random expression can return zero through six, so it includes zero and seven possible results. Under a uniform real draw, endpoints have narrower rounding intervals than interior results. It is therefore unsuitable as a guaranteed fair one-to-six die.
- Quotient three: one mark.
- Remainder two with grouping evidence: one mark.
- Possible zero and zero-to-six range: one mark.
- Reasoned rejection including interval or probability concern: one mark.
Writing focus: Show arithmetic, then make a judgement tied to the claimed use rather than merely defining RANDOM.
29 | TWO-DIMENSIONAL TRAVERSAL
[4 suggested marks]
ScoresGrid : ARRAY[1:2, 1:3] OF INTEGER contains row one (2, 4, 6) and row two (1, 3, 5). Describe a row-first nested traversal. Calculate both row totals and the grand total, and explain where the two total resets belong.
The outer counter visits rows one and two; for each row the inner counter visits columns one through three. Row totals are twelve and nine; grand total twenty-one. Reset RowTotal inside the outer loop before the inner loop, and GrandTotal once before the outer loop.
- Correct row-first counter sequence: one mark.
- Row totals twelve and nine: one mark.
- Grand total twenty-one: one mark.
- Correct reset locations with retention reason: one mark.
Writing focus: Tie the reset location to whether earlier columns or earlier rows must remain in the sum.
30 | FILE SEQUENCE AND RETENTION
[4 suggested marks]
Explain why a program opens a text file before reading and closes it afterwards. Compare READFILE with OUTPUT, and describe what happens to already-read variables and saved content when a READ file is closed.
Opening FOR READ establishes access to the source; closing ends that access and releases its resources when finished. READFILE assigns the next stored item to a destination, whereas OUTPUT displays an expression. Closing does not delete the saved file or erase the working values already read.
- Open establishes READ access: one mark.
- Close ends access when finished: one mark.
- Read assignment compared with display: one mark.
- Saved file and already-read working values retained: one mark.
Writing focus: Keep the operation’s destination explicit: file to variable or expression to screen.
31 | MAINTENANCE AND SAVE ERRORS
[4 suggested marks]
A save routine uses names A and B, repeats an unexplained price literal, and opens its destination FOR WRITE inside a loop for each saved item. Suggest two maintainability improvements and explain the file-writing error and its correction.
Use meaningful identifiers and a named constant for the repeated fixed price; relevant comments or coherent routines can also be valid improvements. Each open FOR WRITE replaces existing content, so the loop loses earlier saved items. Open once before the loop, write all intended items and close after it.
- One relevant contextual maintainability improvement: one mark.
- A second distinct contextual improvement: one mark.
- Replacement inside loop loses earlier items: one mark.
- Correct open-once write-many close-once sequence: one mark.
Writing focus: Make specific proposals and link the error to the mechanism causing data loss.
32 | BUILD A COMPLETE SOLUTION
[6 suggested marks]
A program receives four accepted INTEGER scores from zero to twenty inclusive, stores them in an array, outputs their total and mean, and saves all four to Scores.txt in array order. Demonstrate a complete solution using pseudocode. Then calculate the total and mean for attempts 25, 4, 7, 2, 3. Assume INTEGER input and successful file access.
One possible solution follows. Twenty-five is rejected for the first position. Accepted scores are four, seven, two and three, giving total sixteen and mean four. The file contains those four score items in that order in the agreed format.
DECLARE Scores : ARRAY[1:4] OF INTEGER
DECLARE Position : INTEGER
DECLARE Total : INTEGER
DECLARE Average : REAL
FOR Position ← 1 TO 4
REPEAT
OUTPUT "Enter score from 0 to 20"
INPUT Scores[Position]
UNTIL (Scores[Position] >= 0) AND (Scores[Position] <= 20)
NEXT Position
Total ← 0
FOR Position ← 1 TO 4
Total ← Total + Scores[Position]
NEXT Position
Average ← Total / 4
OUTPUT "Total: ", Total
OUTPUT "Mean: ", Average
OPENFILE "Scores.txt" FOR WRITE
FOR Position ← 1 TO 4
WRITEFILE "Scores.txt", Scores[Position]
NEXT Position
CLOSEFILE "Scores.txt"- Suitable array bounds and numeric declarations: one mark.
- Four positions filled using a loop and inclusive retry: one mark.
- Total initialised once and all accepted scores added: one mark.
- REAL mean and required output: one mark.
- Open WRITE once, write all elements and close: one mark.
- Correct summary values and rejected-attempt interpretation: one mark.
Writing focus: Use complete precise instructions; a description alone does not demonstrate the requested pseudocode.
CHECK YOUR WRITTEN COMMUNICATION
- Did I answer the command word, rather than just name facts?
- For explain, did I show an accurate reason or cause-and-effect link?
- For compare, did I address both things on the same point?
- For evaluate, did I weigh relevant factors and justify my judgement?
- Did I use precise terms and connectives naturally, without repeating or padding?
Self-assess using the suggested content marks, keeping the written total separate from your automatic score. Use the writing checklist to improve an answer rather than adding unofficial language marks.
YOUR NEXT REVISION STEP
Submit sections A and B for targeted lesson links.
Keep your automatic and written marks separate. Pick two weak areas, revisit their lessons and attempt a fresh trace or explanation. Use the Topic 8 revision page for complete coverage, worked examples and a selectable flashcard list. These original practice scores are not official grade predictions.