S6 ICT: object-oriented programming and debugging (error rework)
- 2026-11-20
S6 ICT: object-oriented programming and debugging (error rework)
Error rework: ten common confusions corrected one by one in a single pass.
Error rework: the ten commonest confusions This paper targets repeated slips. A capitalised class name is convention, not syntax; print and return are not interchangeable and a printing-only function returns None; identifiers cannot start with a digit. An error message usually means a syntax or runtime error while a logic error is silent; try/except does not remove an error but replaces its handling; inheritance reuses rather than copies, so a parent change reaches the child. Indexes start at 0, so a 4-element list ends at index 3; print alone is not a debugging strategy; while True leaves through break.
01 Paper details (check answers afterwards)
| Item | Detail |
|---|---|
| Questions | 10 |
| Suggested time | 25 |
| Difficulty mix | Foundation 3 · Intermediate 3 · Challenge 3 · Error redo 1 |
| Chapter | Chapter: S6 ICT: Object-Oriented Programming and Debugging |
| Level | Error rework (10 items) |
02 Questions (10 items)
- FoundationMust a class name start with a capital letter?
- FoundationCan print and return replace each other?
- FoundationMay a variable name start with a digit?
- IntermediateDoes an error message always mean a logic error?
- IntermediateOnce try/except is added, does the error disappear?
- IntermediateDoes a subclass inherit by copying the parent code?
- ChallengeDo list indexes start at 0 or 1, and which index reads the first element?
- ChallengeIs inserting print statements enough for debugging?
- ChallengeDoes while True always create an infinite loop?
- Error redoCorrect four confusions: an object is a class; an attribute is a method; list indexes start at 1; print equals return.
03 Answers and one-line notes
| # | Answer | One-line note |
|---|---|---|
| 1 | No, that is a community convention rather than a syntax rule, and it does not affect whether the program runs. | The convention signals a class at a glance, but code that breaks it still runs. |
| 2 | No; print only displays text while return hands the value back to the caller for further use. | A function that only prints returns None, so using its result later fails. |
| 3 | No; an identifier may start with a letter or an underscore and only then contain digits. | A leading underscore is legal but conventionally marks internal use. |
| 4 | No; a message usually indicates a syntax or runtime error, while a logic error normally produces no message at all. | Read the line number and error type in the message before judging the category. |
| 5 | No; the error still occurs, but it is caught and handled instead of stopping the program. | The cause still needs logging or fixing, otherwise the error is merely hidden. |
| 6 | No; the subclass reuses the parent definition at run time without copying, so a change in the parent also affects the subclass. | Copy and paste leaves two copies to maintain; inheritance keeps one. |
| 7 | They start at 0, so the first element uses index 0. | For a list of length n the last valid index is n minus 1. |
| 8 | No; print shows only chosen points, a step debugger shows the whole state, and unit tests stop the bug from returning. | print suits a quick check, a debugger suits tracing flow, and tests guard the result. |
| 9 | No; a break or return inside the loop leaves it when that line runs. | The real risk is a condition that never changes, so an explicit exit path is required. |
| 10 | A class is the blueprint and an object an instance; attributes store data and methods carry out behaviour; indexes start at 0; print displays while return hands a value back. | All four come from treating two distinct ideas as one, so check them one by one. |
04 What to do after marking
- After marking, redo only the wrong items and write down which step went wrong (formula, unit, or misread number).
- Repeat the same item two days later; move to the next paper only when both attempts are correct.
- Parents only need the answer and note columns; there is no need to explain every item.
Want to separate class from object and inheritance from polymorphism, then debug with a real debugger instead of scattered print calls? Book a TutorZone tutor and link the concepts to practice in twenty-five minutes.Tutor Registration →
Questions and answers are written originally by the TutorZone team and are not taken from any school, publisher or examination authority paper. Every value is checked by computer.



