Lists · Review Code Quality
Judge — analyse and evaluate
L6 Evaluation
Macro Structure
~4 min
Review the negative-number check
An AI generated this function to report whether a list contains any negative number. It passes every test you try. Which review comment is the most justified?
def contains_negative(numbers):
found = False
for n in numbers:
if n < 0:
found = True
return found
Why this activity was chosen
- Bloom level: L6 Evaluation: Judge working code and pick the most justified review comment.
- Block Model level: Macro Structure (step 4 of 4): the purpose of the whole program: the problem it solves and the goal it serves.
- Misconception targeted: shown after you answer, so it does not give the answer away.
Evaluating quality is different from checking correctness. Learners practise separating 'wrong' from 'could be better', and rejecting confident but unjustified criticism or praise, which is a core skill when reviewing generated code.
AI’s role here: AI may prompt the learner to test correctness first. It must not rank the comments.