/en-tutor-prep-s4-ict-debugging-version-control-practice-1/
/en-tutor-prep-s4-ict-debugging-version-control-practice-1/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

S4 ICT: debugging and version control (basics)

S4 ICT: debugging and version control (basics)

  • 2026-11-20

S4 ICT: debugging and version control (basics)

First paper: the three error types, breakpoints, commits and the three places of a repository, with pass rates over 40 tests and 100 commits.

Basics: the three error types and version control concepts The first step in debugging is naming the error type. A syntax error stops the program from running, a runtime error stops it midway, and a logic error finishes with a wrong answer. Debuggers replace print statements with breakpoints and stepping. Version control keeps a working copy, a staging area and a repository, and a commit reaches only the local repository, so backup is separate. This paper practices proportion with 28 of 40 tests passing, 40 of 200 hours spent debugging and 15 fixes among 100 commits.

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 Basics (10 items)

02 Questions (10 items)

  1. FoundationWhich three kinds of program error are normally recognised?
  2. FoundationA 120-line program contains 3 syntax errors and each run reports only the first. How many runs are needed at minimum?
  3. FoundationOf 40 test cases, 28 pass. What is the pass rate?
  4. FoundationWhat does a breakpoint in a debugger do?
  5. IntermediateWhat are the three places in a version control system?
  6. IntermediateA project spends 200 hours in development, 40 of them on debugging. What share is debugging?
  7. ChallengeOf 100 commits, 15 fix defects. What share of commits carry no defect fix?
  8. ChallengeA change touches 10 files but only 4 are finished. How many should be committed?
  9. Error redoIs it true that one commit means the work is backed up?
  10. Error redoIs it true that a program which runs to the end without crashing has no errors?

03 Answers and one-line notes

# Answer One-line note
1 Syntax errors, runtime errors and logic errors. The three split on where the program fails, and that split decides which debugging tool to use.
2 At least 3, because the compiler or interpreter stops at the first syntax error and only reports the next one after it is fixed. Syntax errors clear one at a time, so several errors mean several runs rather than a rewrite.
3 Seventy percent, since 28 divided by 40 is 0.7. A pass rate counts correct cases only; it says nothing about how many lines the tests touched.
4 It pauses execution at a chosen line so the variable values and call stack can be inspected without adding print statements. A breakpoint turns guessing into looking, which is the basic tool for long programs.
5 The working copy, the staging area and the repository; changes travel from the working copy through staging into the repository at commit. Keeping the three apart allows only part of the changes to be committed.
6 Twenty percent, since 40 divided by 200 is 0.2. Debugging time must be recorded separately, or every schedule will underestimate it.
7 Eighty-five percent: 100 minus 15 is 85, and 85 over 100 is 0.85. A high fix ratio usually means thin testing earlier, not that commits are too frequent.
8 Only the 4 finished files, that is forty percent of the change; the other 6 stay in the working copy. One commit should hold one complete piece of work, so unfinished edits stay out.
9 No. A commit records the change in the repository only; if the repository and the machine both fail everything is lost, so backup must reach another machine or a remote. Version control covers history and comparison while backup covers disaster recovery; they never replace each other.
10 No. A logic error does not stop the program, it only produces a wrong result, such as an invoice printed with the wrong discount. Tests must check whether the result is right, not merely whether the program stopped.

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.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →