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

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

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

  • 2026-11-15

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

Paper 3 (challenge): ten Python programming questions with answers and one-line notes.

Direct answers Level: S4 ICT; format: variables and types, integer division, conditionals, loops, lists and functions.

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: S4 ICT: Python Programming Basics
Level S4

02 Questions (10 items)

  1. FoundationHow many times does for i in range(5): run, and what values does i take?
  2. FoundationWhat does print(sum(range(1, 6))) output?
  3. FoundationUsing a for loop to add the numbers 1 to 10, what is the total?
  4. IntermediateWhat does print(sum(range(2, 11, 2))) output?
  5. IntermediateWith count = 0 and a while count < 3: loop that adds one each time, how many rounds run?
  6. IntermediateUsing for k in range(1, 6) to print and add 7 * k, what is the total?
  7. ChallengeFrom 1 to 100 the multiples of 3 add to 1683, of 5 to 1050 and of 15 to 315; what do the multiples of 3 or 5 add to?
  8. ChallengeWith n = 1234, extracting each digit in a while loop, what are the digit sum and digit product?
  9. ChallengeWith 1000 saved and multiplied by 1.05 each year, how many years does the while loop run before the amount reaches 1500?
  10. Error redoWith i = 0 and a while i < 3: loop that only prints i and forgets to add one, what happens?

03 Answers and one-line notes

# Answer One-line note
1 Five times, with i equal to 0, 1, 2, 3 and 4 range(5) starts at 0 and stops before 5.
2 15 One plus two plus three plus four plus five is fifteen.
3 55 Adding one through ten gives fifty-five.
4 30 The range starts at 2 with step 2 and gives 2, 4, 6, 8 and 10, which add to thirty.
5 Three rounds count goes from 0 to 2 in three rounds, and at 3 the condition fails.
6 105 Seven, fourteen, twenty-one, twenty-eight and thirty-five add up to one hundred five.
7 2418 Adding the two groups counts the multiples of fifteen twice, so subtracting 315 gives 2418.
8 Sum 10, product 24 One plus two plus three plus four is ten, and one times two times three times four is twenty-four.
9 Nine years Multiplying by 1.05 nine times is the first time the amount passes fifteen hundred, and after eight years it is still short.
10 An infinite loop that keeps printing 0 i stays zero so the condition never fails, and i += 1 inside the block is required.

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.

When code fails, read the error message for three things: the line, the error type and the value that was not what you expected. Strings and numbers do not add, input always arrives as a string, so convert the type before calculating; indexes start at 0, so a list of length 3 ends at index 2; indentation is program structure, not decoration. For counting tasks, write the range start, stop and step before calculating.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 →