/en-tutor-prep-s2-ict-algorithms-flowcharts-practice-2/
/en-tutor-prep-s2-ict-algorithms-flowcharts-practice-2/
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

Paper 2: Loop counts, conditions and tracing

Paper 2: Loop counts, conditions and tracing

  • 2026-11-21

Paper 2: Loop counts, conditions and tracing

Chapter practice with ten items, answers and a one-line note for each, about 25 minutes.

Paper 2 Ten items on this chapter with answers for immediate marking.

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: S2 ICT: algorithms and flowcharts
Level Advanced

02 Questions (10 items)

  1. FoundationA loop counts from 1 to 10 in steps of 1. How many times does the body run?
  2. FoundationAdd only the odd numbers from 1 to 9. What is the total?
  3. FoundationA variable starts at 2 and doubles while it is not more than 20. How many rounds?
  4. FoundationThe outer loop runs 3 times and the inner loop runs 4 times per outer round. How many inner rounds?
  5. IntermediateIf x is greater than 10 print Big, otherwise print Small. What is printed when x is 10?
  6. IntermediateWhat is the remainder of 12 divided by 5, and is 12 divisible by 4?
  7. ChallengeSwapping two variables: x is 5 and y is 3. Copy x to temp, set x to y, then set y to temp. What are x and y now?
  8. ChallengeA counter starts at 0 and runs from 1 to 6, adding 1 for every even number. What is the final value?
  9. Error redoA variable starts at 1 and triples while it is less than 100. How many rounds?
  10. Error redoSearching for 16 in [4, 8, 15, 16, 23, 42] from the left, how many comparisons are needed?

03 Answers and one-line notes

# Answer One-line note
1 10 times. There are ten values from 1 to 10, so the body runs once for each.
2 25. 1 plus 3 plus 5 plus 7 plus 9 is 25, five odd values in all.
3 4 rounds: 2, 4, 8 and 16. The next value would be 32, which exceeds 20, so the loop stops there.
4 12 rounds. 3 times 4 equals 12; nested loops multiply their counts.
5 Small. The test is strictly greater than 10, so 10 takes the false branch.
6 The remainder is 2, and 12 is divisible by 4. 12 equals 2 times 5 plus 2, while 12 over 4 leaves nothing; code often uses the remainder to test divisibility.
7 x is 3 and y is 5. Without the temp step one of the values is overwritten and lost.
8 3. The even numbers are 2, 4 and 6, so the counter reaches 3.
9 5 rounds: 1, 3, 9, 27 and 81. The next value would be 243, past 100, so there are five rounds rather than six.
10 4 comparisons. It compares 4, 8 and 15 before reaching 16, which is the fourth item.

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 the whole chapter? See all four difficulty papers on the chapter page.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 →