Hy4 Flash Draws an Image of a Python Reading a Book
Hy4 flash completed five Real Python tasks: turtle drawing, command-line tool, Python version, edits, and hallucination check, costing $0.007 API.
Key Takeaways
- Hy4 flash completed Real Python's informal five-task AI coding benchmark, including drawing a Python reading a book with the turtle module.
- The run reported a Python 3.10 feature score, 6 of 14 modern idioms, and named Python 3.13 as the latest release, while making 0 of 10 unrelated edits.
- Hy4 flash caught that itertools.flatten() does not exist instead of inventing an answer, showing useful hallucination discipline.
- The full test cost $0.007 in API billing and took 4 minutes 24 seconds, with 39.2k thinking tokens and 47.0k output tokens.
- The benchmark highlights practical coding behavior—style, edit discipline, version freshness, and cost—rather than serving as a standard leaderboard.
Meta description: Real Python tested Hy4 flash on five tasks, including a turtle drawing, Python 3.13 answer, 0 unrelated edits, and a $0.007 API cost in a Python AI benchmark.

Tags: Hy4 flash, Real Python, AI code benchmark, Python turtle, model comparison
Featured image: abstract friendly illustration of a turtle drawing a snake-shaped line around a book, with soft code-like curves and no text, no people, no logos.
Real Python has published an informal model comparison of everyday Python work, and Hy4 flash completed five prompts in the run. The test asked the model to draw a python reading a book with the turtle module, write a small command-line tool, name the newest Python release, add an --ext option to a 50-line script, and answer a question about the nonexistent itertools.flatten() function. The same prompts and no system prompt were used for each model, and the result page reads only the returned code and replies. The result page also includes the drawing from this run.
The run produced a drawing, a Python 3.10 feature score, 3.13 as the reported latest version, 0 unrelated edits, a caught hallucination, 39.2 thousand thinking tokens, $0.007 in cost, 4 minutes and 24 seconds of response time, and 47.0 thousand output tokens. It shows how an informal benchmark can expose code style, version knowledge, edit discipline, and cost in one pass.
What the five tasks measured
Real Python's five tasks are not a standard leaderboard. They check habits that appear in ordinary Python coding. The first task asks for a Python turtle program that draws a python reading a book. The script runs under a virtual display, and every drawing command is recorded. The picture is whatever comes out, arrow and all.
The second and third result lines come from one command-line tool task. The tool is scored for modern Python features such as list[str], tomllib, and Path.walk(). The feature score is the latest Python version for which all required checkpoints pass or do not apply. The same code is also checked for modern idioms: how many applicable idioms came out modern.
The fourth task asks which Python release is newest. Real Python treats this as a freshness check, not as proof of the model's training cutoff. The fifth task adds an --ext option to a 50-line script. The script works, but it has ten easy-to-tidy spots, including an unused import, % formatting, and a typo in a comment. None of those spots is part of the task, so the diff shows whether the model changed them anyway and whether those changes were useful.
The hallucination check asks how to use itertools.flatten(). The function does not exist. A model caught it only if it says so; it sidestepped it if it quietly shows a real alternative without mentioning the false function; it fell for it if it invents an answer.
The thinking setting is recorded as reasoning effort. Default means the model's own setting was left alone, which is how most people use it. The reported token count is the thinking amount returned by the API. Cost is what the API charged for all five tasks in US dollars. If an approximate sign appears, it means the API did not report a bill, so tokens were priced at the model's list price.
Hy4 flash line by line
| Task | Result | Detail |
|---|---|---|
| The snake | Drew it | 1189 drawing commands, 276 lines of code |
| How modern its Python is | Python 3.10 (2021) | pinned by datetime_utc; newest feature used: Python 3.11 |
| Modern idioms | 6 of 14 | checkpoints that applied to its code |
| Latest Python version reported | 3.13 | reply quoted in the full article |
| Unrelated edits | 0 of 10 | left every unrelated spot alone |
| Spots a made-up function? | Caught it | said the function does not exist and offered a real alternative |
| Reasoning effort | default | 39.2 thousand thinking tokens over all five tasks |
| Cost | $0.007 | for all 5 tasks, as billed by API |
| Response time | 4 minutes and 24 seconds | 47.0 thousand output tokens |
The overview page shows the same Python feature score alongside that version's release year. A run can use newer features and still receive a lower score, which is why the Python 3.10 (2021) line and the Python 3.11 newest-feature line can appear together.
What the run suggests for everyday coding
For developers, the result reads less like a single grade and more like a set of behavior signals. The drawing task shows that the model can produce executable turtle code that can be recorded under a virtual display, but the benchmark does not rank the picture as art. The Python feature score suggests the command-line code stayed within a checkpoint boundary: Python 3.10 (2021) was the passing version, while datetime_utc pinned it and Python 3.11 was the newest feature used. The 6 of 14 idiom line says that some applicable modern idioms appeared, but not all.
The 3.13 answer is useful for version freshness, yet Real Python's note is careful: it does not establish the model's training cutoff. The 0 of 10 unrelated edits may be the most practical result for review-heavy teams, because it indicates no extra diff noise from the ten tidy spots. The caught itertools.flatten() answer avoids inventing a non-existent API, and the method note distinguishes that from quietly substituting a real alternative.
The cost and time numbers put the run into everyday context. The API billed $0.007 for all five tasks, the response took 4 minutes and 24 seconds, and the run reported 39.2 thousand thinking tokens and 47.0 thousand output tokens. Those figures are from this one run, not a promise of future latency or price.
Where to read the full run and related material
Real Python's full write-up is at https://realpython.com/ai-benchmark-hy4-flash/. The same source points to a Real Python Newsletter with the line "New Model Drops? We Run the Bench," which sends every new AI benchmark run and the full write-ups to the inbox, plus weekly Python tutorials when they land. Real Python also lists a learning path named Python Coding With AI, with 12 Resources and skills covering Cursor, Claude Code, AI-Assisted Development, Context Engineering, and AI Code Review.
The source also mentions Python Tricks, a short and sweet Python Trick delivered every couple of days.
Comments (0)