Idea · Oct 5, 2026
Turtle Target Practice
Instructors post a target drawing; students write Python turtle code in the browser and get a stroke-level overlay of what is missing, extra or misplaced, without ever seeing the reference solution.
What it would do
Inspired by a Show HN beginner course where students learn Python by making their code draw, this tool turns drawing exercises into self-checking practice. Student code runs client-side in Pyodide with an instrumented turtle module that records every segment, arc and fill as geometry rather than pixels. The checker compares the student's segment list to the instructor's (normalized for start position, drawing order and tiny floating-point drift) and paints a three-color overlay: green for matched strokes, red for missing ones, orange for extra or misplaced ones. Feedback stays solution-free: instead of showing code, it reports facts like 'your square closes but the second side is 10 units short' or 'the pattern repeats 5 times, the target repeats 6', which nudges students toward loops, functions and parameters. Instructors get a gallery of class attempts grouped by the kind of mismatch, so the most common wrong drawing becomes the next lecture example.
Key features
- In-browser Python via Pyodide with an instrumented turtle that records geometry, not pixels
- Order-insensitive segment matching with tolerance, producing a matched/missing/extra overlay
- Solution-free textual feedback derived from geometric differences (lengths, angles, repeat counts)
- Instructor authoring: draw or code a target, set tolerance, publish by link
- Class gallery clustering attempts by mismatch type for discussion in lecture