S4 ICT: debugging and version control (error rework)
- 2026-11-20
S4 ICT: debugging and version control (error rework)
Error rework only: ten common confusions corrected item by item, including version numbers read as decimals and commits treated as backup.
Error rework: the ten commonest confusions This paper does one thing: correct the ideas that keep going wrong. A missing colon is a syntax error and division by zero a runtime error, while finishing with a wrong answer is a logic error. High coverage is not proof of correctness; commit is not backup until it is pushed; a branch is not a folder copy; a conflict is not a broken program; bisect is not a commit-by-commit scan; step over and step into serve different purposes; and 1.9.9 is followed by 1.10.0, not 2.0.0.
01 Paper details (check answers afterwards)
| Item | Detail |
|---|---|
| Questions | 10 |
| Suggested time | 25 |
| Difficulty mix | Foundation 4 · Intermediate 2 · Challenge 2 · Error redo 2 |
| Chapter | Chapter: S4 ICT: Debugging and version control |
| Level | Error rework (10 items) |
02 Questions (10 items)
- FoundationA missing colon and a division by zero belong to which error types?
- FoundationA program finishes but computes the discount wrongly. Which error type is that, and what should be done?
- FoundationCoverage is ninety percent. Should more tests be added, and why?
- FoundationWhat separates commit from push, and what is the risk of committing only?
- IntermediateHow should revert and reset be chosen?
- IntermediateIs creating a branch the same as copying the whole folder?
- ChallengeDoes a conflict marker at merge time mean the program is broken?
- ChallengeShould a bad version be hunted commit by commit or with bisect?
- Error redoIn stepping, how do step over and step into differ?
- Error redoWhich version follows 1.9.9?
03 Answers and one-line notes
| # | Answer | One-line note |
|---|---|---|
| 1 | The missing colon is a syntax error, so the program never runs; division by zero is a runtime error that stops at that line. | The evidence differs: one is reported at compile or interpret time, the other needs real input to surface. |
| 2 | A logic error. Compare the output against a hand-calculated expectation, for example 200 at twenty percent off should be 160. | A logic error produces no message, so only test cases with expected values can reveal it. |
| 3 | Yes, because coverage only shows that ninety percent of lines ran; it does not prove correct results or cover boundary values and error handling. | Coverage measures reach, not correctness, and the two must be reported separately. |
| 4 | Commit records into the local repository while push sends it to the remote; committing only means a failed disk takes the whole history. | Treating commit as backup is the commonest version control misunderstanding. |
| 5 | Use revert to keep history when the change is already pushed and possibly pulled by others; use reset only for local tidy-up that was never pushed. | The test is whether anyone depends on that history, not which command feels easier. |
| 6 | No. A branch is only a pointer to a commit, costs almost nothing to create and shares the same repository. | Branches are cheap enough to open and close often, and treating them as copies discourages their use. |
| 7 | No. A conflict only means both sides edited the same section, so a person must choose, remove the markers and rerun the tests. | A conflict is a normal part of merging; an unresolved conflict is the real risk. |
| 8 | Use bisect: each test of the middle version discards half, so 1024 versions need 10 tests instead of up to 1024. | The method only works if each version can be judged clearly good or bad. |
| 9 | Step over treats a whole function call as one step; step into enters the function at its first line to inspect it. | Step into when the fault may sit inside a function, step over when only the main flow matters. |
| 10 | 1.10.0, with the minor number raised and the patch reset; versions are not decimals, so 1.10.0 is newer than 1.9.9. | Comparing version numbers as decimals is the commonest arithmetic error in version control. |
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 syntax, runtime and logic errors clearly separated, plus bisect debugging, commits and version numbers understood? Book a TutorZone tutor and settle the whole debugging and version control workflow in twenty-five minutes of ten items.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.



