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)
- FoundationA loop counts from 1 to 10 in steps of 1. How many times does the body run?
- FoundationAdd only the odd numbers from 1 to 9. What is the total?
- FoundationA variable starts at 2 and doubles while it is not more than 20. How many rounds?
- FoundationThe outer loop runs 3 times and the inner loop runs 4 times per outer round. How many inner rounds?
- IntermediateIf x is greater than 10 print Big, otherwise print Small. What is printed when x is 10?
- IntermediateWhat is the remainder of 12 divided by 5, and is 12 divisible by 4?
- 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?
- ChallengeA counter starts at 0 and runs from 1 to 6, adding 1 for every even number. What is the final value?
- Error redoA variable starts at 1 and triples while it is less than 100. How many rounds?
- 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.



