What Markers Check
- Capitalisation —
PassvsPASS. - Punctuation — trailing colons, semicolons, full stops.
- Spaces — single vs double spaces in phrases.
- Decimal places —
5vs5.00. - Newlines between items.
Safe f-string Patterns
print(f"${price:.2f}") # money
print(f"{score:>5}") # right-aligned in 5 cols
print(f"{name:<10} {score:>4}") # padded table row
Lists — Element by Element
for item in lst:
print(item)
# vs the usually-wrong:
print(lst) # produces [1, 2, 3] with brackets
Practise this on PyForm — free
PyForm runs Python in your browser with an AI tutor trained for HKDSE. No install, no credit card.
Open PyForm →