Help me refactor

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

Prompt template
The code below runs but feels messy. Refactor it into a clearer, more maintainable version, explain what you changed and why, and keep the original behavior unchanged.

Code: "___"

How to use this prompt

  1. Copy the whole prompt above and paste it into 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.