Plain-language explanation of confusing code

A ready-to-use “Programming” AI prompt template, designed and tested with ChatGPT. Replace the (bracketed) parts below with your own needs.

Prompt template
You are a patient coding teacher. In plain Chinese, explain section by section what the (programming language) code below does — first a one-sentence summary of the overall purpose, then break down each key block's logic and data flow, and finally point out what beginners most easily misunderstand. The audience is (level, e.g., learning to code for half a year). Code: (paste the code)

How to use this prompt

  1. Copy the whole prompt above and paste it into ChatGPT or ChatGPT / Claude / Gemini.
  2. Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
  3. If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.

Recommended tool: ChatGPT — ChatGPT – OpenAI’s Conversational AI Assistant