What Python Topics Appear in HKDSE ICT?
HKDSE ICT Paper 1 tests Python programming across three difficulty levels. Paper 1A Part A tests foundation concepts, Part B tests intermediate skills, and Paper 1B challenges you with complex programming tasks.
Based on past papers from 2012โ2025, here are the most frequently tested topics:
- Variables and data types โ int, float, string, boolean (appears in 100% of papers)
- Input and output โ input(), print(), f-strings (100% of papers)
- Conditional statements โ if/elif/else (95% of papers)
- For loops โ range(), enumerate() (98% of papers)
- While loops โ condition-based iteration (80% of papers)
- Functions โ defining, calling, parameters, return values (90% of papers)
- Lists โ indexing, slicing, methods, 2D lists (88% of papers)
- Strings โ methods, slicing, formatting (85% of papers)
- File I/O โ reading and writing files (70% of papers)
- OOP โ classes, objects, methods (65% of papers)
How Marking Works for Python Questions
HKDSE ICT Python questions are marked on a "follow-through" basis โ if you make an error in part (a) but correctly apply that logic in part (b), you can still get marks for part (b).
- Output must match exactly โ spaces and capitalisation matter
- Logic marks are awarded even if output has minor formatting errors
- Partial credit is given for partially correct solutions
- Comments in code are not marked but show good coding practice
Exam Strategy by Paper Section
Paper 1A Part A (Easy โ 30 marks)
These questions test basic Python concepts. They should take you no more than 25 minutes total. Common question types:
- Trace through code and write the output
- Fill in missing lines of code
- Write a short program (under 15 lines)
Paper 1A Part B (Hard โ 40 marks)
These multi-part questions test functions, lists, and algorithms. Spend about 45 minutes here. Always read the entire question before coding โ later parts often inform earlier ones.
Paper 1B (Extreme โ 35 marks)
Complex programs involving OOP, file processing, or advanced algorithms. Spend remaining time here. Prioritise parts worth the most marks.
The 5 Most Important Python Concepts to Master
1. String Formatting with f-strings
name = "Chan Siu Ming"
score = 87.5
print(f"Student: {name}, Score: {score:.1f}")
Output: Student: Chan Siu Ming, Score: 87.5
2. List Operations
scores = [85, 72, 91, 68, 79] print(max(scores)) # 91 print(min(scores)) # 68 print(sum(scores)/len(scores)) # 79.0 scores.sort(reverse=True) print(scores[0]) # 91 (highest)
3. Functions with Return Values
def calculate_grade(score):
if score >= 80: return 'A'
elif score >= 65: return 'B'
elif score >= 50: return 'C'
elif score >= 35: return 'D'
else: return 'F'
grade = calculate_grade(78)
print(grade) # B
4. File Reading
with open('data.txt', 'r') as f:
lines = f.readlines()
for line in lines:
print(line.strip())
5. Basic OOP
class Student:
def __init__(self, name, score):
self.name = name
self.score = score
def get_grade(self):
if self.score >= 80: return 'A'
return 'B' if self.score >= 65 else 'C'
s = Student("Lee Ming", 85)
print(s.get_grade()) # A
Practice Strategy That Actually Works
The most effective way to prepare for HKDSE ICT Python is spaced repetition with real exam questions. Here's the 6-week plan that top students use:
- Weeks 1-2: Master the top 5 concepts above. Do 2 Easy-level problems daily.
- Weeks 3-4: Focus on functions and lists. Do 1 Hard-level problem daily.
- Week 5: Tackle OOP and file I/O. Do past paper questions under timed conditions.
- Week 6: Full mock papers. Review weak areas. Rest the day before.
Practice HKDSE-Style Python Questions Free
PyForm's Special Task mode generates AI-powered Python questions in HKDSE format with instant grading and detailed feedback.
Start Practising Free โ