/en-tutor-prep-s3-ict-python-basics-practice-3/
/en-tutor-prep-s3-ict-python-basics-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

S3 ICT: Python Programming Basics (Paper 3 (challenge))

S3 ICT: Python Programming Basics (Paper 3 (challenge))

  • 2026-11-14

S3 ICT: Python Programming Basics (Paper 3 (challenge))

Paper 3 (challenge): ten questions on Python programming basics, with answers and notes.

Direct answers Level: S3 ICT; format: variables, arithmetic, type conversion, range boundaries, loops and conditionals.

01 Paper details (check answers afterwards)

Item Detail
Questions 10
Suggested time 20
Difficulty mix Foundation 3 · Intermediate 3 · Challenge 3 · Error redo 1
Chapter Chapter: S3 ICT: Python Programming Basics
Level S3

02 Questions (10 items)

  1. FoundationWith total = 0 and for i in range(1, 5): total = total + i * i, what does print(total) output?
  2. FoundationWith n = 12 and while n > 0: n = n // 2, how many times does the loop run?
  3. FoundationWhat verdict does a primality test program give for 29?
  4. IntermediateIn a nested loop, for i in range(3) contains for j in range(2). How many times does the inner statement run?
  5. IntermediateGiven def f(x): return x * 2 + 1, what is f(5)?
  6. IntermediateWith nums = [3, 1, 4, 1, 5], what do print(sum(nums)) and print(max(nums)) output?
  7. ChallengeWhat is the output of print(“abc”[::-1])?
  8. ChallengeA student writes for i in range(10, 0) to count down but the loop never runs. Why?
  9. ChallengeThree scores 82, 90 and 76 are averaged and rounded to one decimal place. What is printed?
  10. Error redoError clinic: a student writes if x = 5: to compare with 5. What is the correct line?

03 Answers and one-line notes

# Answer One-line note
1 30 The loop adds 1, 4, 9 and 16 in turn, giving 30 in total.
2 4 times The value goes 12, 6, 3, 1 and then 0, four iterations in all.
3 prime 29 is not divisible by 2, 3 or 5, and the square of 5 already exceeds 29, so it is prime.
4 6 times The outer loop runs three times and the inner loop twice each time, so 3 times 2 is 6.
5 11 Substituting 5 gives 10 after multiplying and 11 after adding 1.
6 14 and 5 The five numbers add up to 14 and the largest is 5.
7 cba A step of -1 reads the string backwards, so it is reversed.
8 the step of -1 is missing The default step is 1, so a start of 10 greater than the stop of 0 ends at once; range(10, 0, -1) is needed.
9 82.7 The total 248 divided by 3 gives 82.666, which rounds to 82.7.
10 if x == 5: A single equals sign assigns a value, so comparison needs == or the line is a syntax error.

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.

Write down the value of every variable line by line before stating the output. Remember input returns a string, so convert it with int before adding.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.

© TutorZone · www.tutorzone.com.hk · For personal study and teaching use only.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →