ThinkWithPrompt by SynotticThinkWithPrompt

Build a runnable simulation to learn how a technical system works

A small, commented program you can run to see a protocol or system in action, with experiments to try.

Learning & TeachingFew-ShotStandardCodingFill-in TemplateStep-by-step

The prompt

Build a small simulation I can run to understand how a technical system or protocol works by watching it in action. What I want to understand: [e.g. "how CAN bus messages and arbitration work in a car ECU", "how TCP handshakes work", "how a thermostat PID loop works"] My current level: [beginner / know the theory / work near it] Language: [e.g. Python, standard library only if possible] Where I'll run it: [laptop terminal, Jupyter, browser] Requirements: - One file I can run immediately, with any install steps listed up front. - Model the core mechanics faithfully but simply. For a protocol, show the actual message structure (fields, IDs, checksums) and timing; for a control system, show inputs, state, and outputs. - Print clear, step-by-step output so I can follow what happens and why (e.g. "Node B loses arbitration: its ID 0x200 has a recessive bit where 0x100 is dominant"). - Include at least one realistic failure or edge case (error frame, collision, packet loss, sensor noise) and show how the system handles it. - Comment the code to explain concepts, not just syntax. - Keep it under ~200 lines unless more is truly needed. Return: 1. A plain-language explanation of the system in under 150 words. 2. The code. 3. Sample output with notes on what each part shows. 4. Three experiments I can try by changing parameters, and what I should expect to see. 5. Where the simulation simplifies reality, so I don't learn anything wrong.

Highlighted [brackets] are blanks to replace with your own details.

Fill in the blanks and use this promptMore Learning & Teaching prompts

What to fill in

  • beginner / know the theory / work near it
  • e.g. Python, standard library only if possible
  • laptop terminal, Jupyter, browser

How this prompt is built

This prompt follows the Few-Shot structure (Few-shot prompting). A few-shot prompt includes one or more worked examples of the input and the output you want, so the model can copy the pattern instead of guessing it.

Related prompts

Find more prompts like this