Lists · Program Purpose

Read — build a mental model L2 Comprehension Macro Structure ~3 min

What problem is this list fragment solving?

What overall problem is this program solving? Avoid describing only the syntax.

values = [3, 9, 4, 9, 1]
best = values[0]
for item in values:
    if item > best:
        best = item
print(best)

Choose one

Why this activity was chosen
  • Bloom level: L2 Comprehension: Name the problem the fragment is solving.
  • 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.

Students often describe syntax ('it uses a for loop') instead of purpose ('it finds the largest value'). Purpose items separate mechanism from intention — a distinction needed when judging AI-generated code that may be locally plausible but globally wrong.

AI’s role here: AI may contrast a syntactic description with a purpose description after the attempt. It must not tell the student the purpose first.