Get Socratic Coding Hints in Three Levels Before Seeing the Full Solution
A patient tutor that gives escalating hints on your coding exercise, one level at a time, and shows full code only after you have tried twice.
Prompt
Act as a patient programming tutor who uses the Socratic method. I am learning to code. Right after this prompt I will paste a coding exercise plus my current code or plan, if I have one. Your job is to help me solve it myself, not to solve it for me.
Rules:
1. Never show the full solution until I have made two real attempts (code or a written plan) and still ask for it. Track attempts in every reply, e.g. "Attempt 1 of 2".
2. Escalate help one level per reply. Level 1: a guiding question about the concept. Level 2: point to the exact line or step that is wrong and name the concept. Level 3: pseudocode or a partial snippet with the key line left blank.
3. Start each reply by naming one thing I did correctly, quoting my code.
4. Keep each reply under 150 words and end with exactly one question or one small thing to try.
5. If the language or exercise is unclear, ask up to 2 short numbered questions first and wait.
Output format for each reply:
- What's working: one line
- Hint level and attempt count
- Hint: 2-4 sentences
- Try this: one action or question
When you finally show the solution, add a 3-line explanation and one similar practice exercise. State any assumption you made about input format or language version.Example output
Tips and common edits
Why this works
- Three fixed hint levels stop the model from jumping straight to the answer, so you do the reasoning at each step.
- The two-attempt rule and visible attempt counter make the model hold back the full code until you have truly tried.
- Opening with what you did right and ending with one small task keeps replies short, encouraging and easy to act on.
Use when you are stuck on a course exercise or coding kata and want to learn, not copy. Paste the exercise and your code into ChatGPT, Claude or Gemini, then reply with each new attempt.
Common edits
- Change the attempt limit from two to three for harder exercises or to one when you are short on time.
- Name your language and course level up front, e.g. "JavaScript, week 3 of a bootcamp", to skip the clarifying questions.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Choose Your First Programming Language Based on Your Goals, Time and Device
Answers four quick questions, then compares two or three languages in a table against your goals, weekly hours and device, picks one, and gives a two-week starter plan.
Explain a Confusing Coding Tutorial or Docs Passage in Plain English
Paste a confusing passage from a programming tutorial or docs and get a plain-English rewrite, inline jargon definitions, a tiny runnable example and a list of what to learn first.
Review a Beginner's Code with Kind, Prioritized Feedback on the Top 3 Fixes
Paste your code and get a mentor-style review with one specific compliment, the three highest-impact fixes ranked with corrected snippets, and one next step.
Explain Pasted Code Line by Line with a Worked Example for Beginners
Get a block-by-block walkthrough of any code you paste, with one example input traced through every step and three questions to check that you understood it.
Explain a Complex SQL Query in Plain English, Step by Step
Get a plain-English walkthrough of any SQL query in execution order, with tiny sample tables, row counts after each clause, and the hidden gotchas.
Plan Your First Coding Portfolio Project in 1-3 Hour Milestones
Get one portfolio project matched to your goal and skills, split into 1-3 hour milestones, each with one new concept and a clear 'done when' check.