/en-tutor-prep-s4-ict-python-programming-practice-2/
/en-tutor-prep-s4-ict-python-programming-practice-2/
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 2 (intermediate))

S4 ICT: Python Programming Basics (Paper 2 (intermediate))

  • 2026-11-15

S4 ICT: Python Programming Basics (Paper 2 (intermediate))

Paper 2 (intermediate): 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. FoundationWith score = 58 and a program that prints pass when score >= 60 and fail otherwise, what is printed?
  2. FoundationIn Python, what do one equals sign and two equals signs mean?
  3. FoundationWhat marks several lines as belonging to the same if block?
  4. IntermediateWith score = 78 and grades A for 80 or above, B for 70 or above and C otherwise, which grade is printed?
  5. IntermediateWhich keyword requires both conditions, and which needs only one?
  6. IntermediateWith n = 7 and a program printing even when n % 2 == 0 and odd otherwise, what is printed?
  7. ChallengeWith score = 92 and grades A for 90 or above, B for 80 to 89, C for 70 to 79 and fail otherwise, which grade is printed?
  8. ChallengeA leap year is divisible by four but not by one hundred, or divisible by four hundred. Which of 2024, 1900 and 2000 are leap years?
  9. ChallengeFor sides 3, 4 and 5, does the test 3 ** 2 + 4 ** 2 == 5 ** 2 hold?
  10. Error redoWhat happens with if x = 5: and what is the correct form?

03 Answers and one-line notes

# Answer One-line note
1 Fail Fifty-eight is below sixty, so the condition is false and the else branch runs.
2 One assigns a value and two compare for equality x = 5 stores five in x, while x == 5 asks whether x equals five.
3 Indentation Lines with the same indentation form the block, and inconsistent indentation raises an error.
4 B Seventy-eight fails the eighty test but passes the seventy test, so it is graded B.
5 Use and for both, or for either and needs both sides true, while or passes as soon as one side is true.
6 Odd Seven divided by two leaves remainder one, so the condition is false.
7 A Ninety-two meets the ninety threshold, so the first branch holds and later tests are skipped.
8 2024 yes, 1900 no, 2000 yes 2024 is divisible by four and not by one hundred; 1900 is divisible by four and by one hundred but not by four hundred; 2000 is divisible by four hundred.
9 Yes, it is a right-angled triangle Nine plus sixteen is twenty-five, exactly the square of five.
10 A SyntaxError is raised, and if x == 5: is correct The condition must ask about equality, which needs two equals signs.

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 →