Skip to content

๐Ÿง‘๐Ÿพโ€๐Ÿ’ป Get code explained

Starter Analyse ๐Ÿ’ป Computational Thinking ๐Ÿค– AI Thinking and AI Literacy โฑ about 10 minutes 10 points

The challenge

You found this Python code and do not understand it. Write a prompt asking an AI to explain it for a beginner, line by line, and to say what it prints.

nums = [4, 9, 2, 7]
total = 0
for n in nums:
    if n % 2 == 1:
        total += n
print(total)

Instructions

  1. 1Include the code in your prompt.
  2. 2Say who the explanation is for.
  3. 3Ask for a line-by-line explanation and the output.

Rules

  • Paste only the code given โ€” no passwords or private data in prompts.

Success criteria

Your submission is marked against these criteria only.

  • Includes the code Checked automatically 3 pts
  • Beginner level Checked automatically 1 pt
  • Line by line Checked automatically 2 pts
  • Asks what it prints Checked automatically 2 pts
  • Asks to learn, not just get an answer Needs AI review โ€” not configured yet, so not assessed 2 pts
words

Your submission is private. It is marked only against the success criteria โ€” not on whether an AI produced an answer.

What an AI replied to your prompt

For comparison only โ€” this reply does not affect your score. Does it give you what you asked for?