Smart-Check Routine

  1. Typical case — pick a simple input and trace the output.
  2. Empty input — does your loop handle [] or ""?
  3. Single item — what if n=1?
  4. Boundaryn=0, negative numbers, max values.

Common Bugs to Hunt

Output Format Check

Re-read the question and compare your output character-by-character. Missing colons, spaces, or capitalisation routinely costs 1 mark each.

Practise this on PyForm — free

PyForm runs Python in your browser with an AI tutor trained for HKDSE. No install, no credit card.

Open PyForm →