๐ง๐พโ๐ป 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
- 1Include the code in your prompt.
- 2Say who the explanation is for.
- 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
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?