Paper 2: Loops and operators
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: Programming basics: variables and loops |
| Level | Advanced |
| # | Answer | One-line note |
|---|---|---|
| 1 | 15 | Adding 1 to 5 gives 15. |
| 2 | 3 | The condition allows 3 additions before it turns false. |
| 3 | 30 | A step of 2 adds 2, 4, 6, 8 and 10, giving 30. |
| 4 | 9 and 8 | The double star means power, not multiplication. |
| 5 | 11 | len counts characters, of which there are 11. |
| 6 | Before the loop starts | Resetting it inside the loop wipes out earlier running totals. |
| 7 | 4 times | i takes 10, 7, 4 and 1 before falling out of range. |
| 8 | The text b | Indexing starts at 0, so the second character is b. |
| 9 | 3 | int drops the decimal part instead of rounding. |
| 10 | A single equals sign assigns; comparison needs two | The condition should be written as if x == 5:. |
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.

