Conditionals · Debugging
Judge — analyse and evaluate
L4 Analysis
Relations
~4 min
Pass mark labelled the wrong way
The intended rule is: a score of 50 or more is a pass. Identify the bug.
score = 70
if score >= 50:
print("fail")
else:
print("pass")
Why this activity was chosen
- Bloom level: L4 Analysis: Find the fault and say why it matters.
- Block Model level: Relations (step 3 of 4): how parts of the program affect each other: variable updates, function calls, data flow and control flow.
- Misconception targeted: shown after you answer, so it does not give the answer away.
Debugging is analysis: locating the mismatch between intended and actual behaviour. In an AI-rich setting this is the same skill used to inspect generated code.
AI’s role here: AI may hint at the region of the program to inspect. It must not point at the exact line as a completed answer.