Coding · Learn to Code

Learn a Coding Concept With Everyday Examples

Understand a confusing idea like loops, variables or functions through simple real-life comparisons.

Prompt Text output

Please teach me this coding idea: [CONCEPT]. I am learning [LANGUAGE] and I am a complete beginner. Explain it first with an everyday comparison from [EVERYDAY_TOPIC], without any code. Then show a tiny code example, no more than ten lines, and explain each line. Tell me where I can type and run this example for free in my browser without installing anything. Then show one common beginner mistake with this idea and how to fix it. Finish with a short question to check that I understood, and wait for my answer before telling me if I am right.

Fill in the brackets

[CONCEPT]
e.g. loops, variables, functions, if statements, lists
[LANGUAGE]
e.g. Python, JavaScript
[EVERYDAY_TOPIC]
e.g. cooking, football, shopping at the market, driving

How to use

  1. Copy the prompt.
  2. Replace the text inside [BRACKETS] with your own details.
  3. Paste it into ChatGPT or another AI assistant.
  4. Read the result and ask for changes if needed.

Tip: Pick an everyday topic you know well; the comparison will make far more sense to you.