Functions · AI Suggestion Evaluation

Judge — analyse and evaluate L6 Evaluation Relations ~4 min

Is this even-number test trustworthy?

A student asked an AI to complete is_even so that it returns True when n is even. The AI suggested the highlighted line. Accept or reject the suggestion, then explain your reasoning.

def is_even(n):
    # AI suggestion appears below
AI suggestion
return n % 2 == 1

Your decision

Why this activity was chosen
  • Bloom level: L6 Evaluation: Accept or reject a generated line, with a reason.
  • 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.

The pedagogically interesting moment is not generating code but deciding whether to trust it. Students practise evaluation: correctness, fit to the requirement, and a stated justification.

AI’s role here: The platform presents a supposed AI suggestion. A live model must not quietly correct the suggestion or complete the function for the student.