Knowledge organisersMaintainable Code
Explain code blocks.
Comments are notes in the code that Python ignores. Use # for single-line comments. Good comments explain why code does something, not what it does (the code itself shows that).
# starts a single-line comment# Apply 20% discount# Calculate final price with VAT
price = 50
vat = price * 0.2 # 20% VAT rate
total = price + vat
print(total)