/en-tutor-prep-s3-ict-python-loops-functions-practice-3/
/en-tutor-prep-s3-ict-python-loops-functions-practice-3/
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 3: Challenge: algorithmic loops and function design

Paper 3: Challenge: algorithmic loops and function design

  • 2026-11-21

Paper 3: Challenge: algorithmic loops and function design

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

Paper 3 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 Challenge

02 Questions (10 items)

  1. FoundationA nested loop prints a 5-row triangle where row n holds n stars. How many stars in total?
  2. FoundationUse a loop to add 1 squared through 10 squared. What is the total?
  3. FoundationCollatz rule: halve an even number, triple plus one an odd one. How many steps from 6 to reach 1?
  4. FoundationUse a while loop for the Euclidean algorithm. What is gcd(48, 18)?
  5. IntermediateUse a while loop to add the digits of 4728. What is the total?
  6. IntermediateCount the primes up to 30 with a loop. How many are there?
  7. ChallengeWhat is the sum of the first ten Fibonacci numbers starting 1, 1, 2, 3, 5, 8?
  8. ChallengeUse a loop to list every divisor of 36. How many are there?
  9. Error redoStarting at 100 and halving each round, how many rounds before the value first drops below 1?
  10. Error redoWhat is wrong with the line `while count = 0:`?

03 Answers and one-line notes

# Answer One-line note
1 15. 1+2+3+4+5 = 15, the sum of the row counts.
2 385. Each round adds i * i, and the closed form 10 x 11 x 21 / 6 agrees.
3 Eight steps. The path is 6-3-10-5-16-8-4-2-1, which is eight operations.
4 6. The remainders run 12 then 6 then 0, and the last non-zero divisor is 6.
5 21. Each round adds n % 10 then does n //= 10, giving 4+7+2+8 = 21.
6 Ten. They are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29.
7 143. The ten terms are 1, 1, 2, 3, 5, 8, 13, 21, 34 and 55, which total 143.
8 Nine. They are 1, 2, 3, 4, 6, 9, 12, 18 and 36.
9 Seven. The values fall 100, 50, 25, 12.5, 6.25, 3.125, 1.5625 then 0.78125, so the seventh round is the first below 1.
10 It uses the assignment sign = instead of the comparison ==, so Python raises a syntax error. Comparison needs ==; and even with == 0 the loop never ends unless count changes inside the body.

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 →