Paper 1: Basics: range, accumulators and simple functions
Chapter practice with ten items, answers and a one-line note for each, about 25 minutes.
| Item | Detail |
|---|---|
| Questions | 10 |
| Suggested time | 25 |
| Difficulty mix | Foundation 4 · Intermediate 2 · Challenge 2 · Error redo 2 |
| Chapter | Chapter: S3 ICT: Python loops and functions |
| Level | Basic |
| # | Answer | One-line note |
|---|---|---|
| 1 | Five times (i takes 0, 1, 2, 3 and 4). | range(5) starts at 0 and holds five values, so the body runs five times. |
| 2 | 15. | The loop adds 1, 2, 3, 4 and 5 in turn. |
| 3 | 10. | It starts at 2 and steps by 2: 2, 4, 6, 8, 10, and 12 is already past the stop value. |
| 4 | 5050. | The pairing formula gives 100 x 101 / 2, and the loop total matches it. |
| 5 | Three lines (3, 2, 1). | n drops by one each round and the loop stops once n reaches 0. |
| 6 | 14. | The parameter x receives 7 and the function returns 7 x 2. |
| 7 | 7. | The two arguments go in by position, so 3 + 4 = 7. |
| 8 | 30. | 2+4+6+8+10 = 30, and a guard of `i % 2 == 0` picks the even values. |
| 9 | 81. | 9 x 9 = 81. |
| 10 | Never changing the variable the condition depends on, which gives an endless loop. | If the condition is n > 0 but n never changes, it stays true for ever and the program never stops. |
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.

