/en-tutor-prep-s3-ict-python-loops-functions-practice-4/
/en-tutor-prep-s3-ict-python-loops-functions-practice-4/
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 4: Retry: correcting ten common slips

Paper 4: Retry: correcting ten common slips

  • 2026-11-21

Paper 4: Retry: correcting ten common slips

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

Paper 4 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: S3 ICT: Python loops and functions
Level Retry

02 Questions (10 items)

  1. FoundationA student claims `range(5)` counts from 1 to 5. Is that right?
  2. FoundationDoes `range(1, 5)` ever produce the number 5?
  3. FoundationA student says a while loop can never hang as long as the condition is written correctly. True?
  4. FoundationCan `if x = 3:` be used to test whether x equals 3?
  5. IntermediateA student says printing inside a function is the same as returning. True?
  6. IntermediateCan a function be called before its def line runs?
  7. ChallengeCan a variable created inside a function still be used outside it?
  8. ChallengeDoes `range(0, 10, 2)` produce ten numbers?
  9. Error redoWith a nested loop of 4 outer and 5 inner rounds, does the inner body run 9 times?
  10. Error redoDo break and continue do the same thing?

03 Answers and one-line notes

# Answer One-line note
1 No, it runs from 0 to 4. A single argument to range is a count, and the start defaults to 0.
2 No, it yields 1, 2, 3 and 4 only. The second argument is an exclusive stop value.
3 False: the variables in the condition must change inside the loop. A condition that never changes stays true for ever and the program hangs.
4 No: = assigns, and comparison needs ==. Writing `if x = 3` is an immediate syntax error.
5 False: print only displays, and without return the function gives None. Assigning the result of such a function stores None.
6 No, the name only exists after the def statement executes. Python runs top to bottom, so calling early raises NameError.
7 No, it is a local variable. Local names disappear when the call ends, so pass values back with return.
8 No, only 0, 2, 4, 6 and 8, five numbers. A step of 2 halves the count, and the stop value 10 is excluded.
9 No, it runs 4 x 5 = 20 times. The inner loop restarts in full on every outer round.
10 No: break leaves the loop, while continue skips only the rest of this round. After continue the loop still moves on to its next round.

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 →