首页›Real Python›文章

Step 5 Draws a Python Reading a Book

Real Python · 2026年12月1日

AI 摘要 AI 生成,可能有误

Real Python's informal AI benchmark asked the Step 5 model to write a turtle program drawing a python reading a book, but the 253-line script failed with an AttributeError and produced zero drawing commands. Across the five tasks, the model scored at Python 3.10 for modernity, passed 7 of 12 modern idiom checkpoints, correctly caught the nonexistent itertools.flatten() function, and made 1 of 10 possible unrelated edits. The full run cost $0.15, used about 49.4k thinking tokens, and took roughly 6 minutes 44 seconds.

We asked Step 5 to draw a python reading a book using the turtle module. It’s one of five tasks in Real Python’s informal model comparison, which explores how models handle everyday Python work. Here’s the drawing from this run:

Watch it draw

New here? What the five tasks measure

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Real Python

Plotting Declarative Charts With Altair

AI 摘要The article introduces Altair, a declarative Python visualization library where users describe what their data means—such as which columns map to axes, colors, and interactivity—and the library generates the chart, unlike Matplotlib's approach of scripting every visual detail. Altair produces web-native charts (HTML and JavaScript) that render in notebooks and can be saved as standalone files or embedded in web pages, making it ideal for interactive exploratory analysis. It's not a replacement for Matplotlib, which remains the better choice for pixel-precise publication figures or 3D plots, so the two libraries serve complementary use cases.

Quiz: Using Python for Data Analysis

In this quiz, you’ll test your understanding of the video course Using Python for Data Analysis. By working through this quiz, you’ll revisit the stages of a data analysis workflow, how to fix missing values, wrong data types, out-of-range

Generating Python Tests With AI: A Suite You Can Trust

Say you’ve inherited a project with no tests or so few that you can’t refactor it safely. Generating Python tests with AI seems like the quick way out, but a one-line prompt often gives you a suite that passes without catching real bugs. Th

Quiz: Generating Python Tests With AI: A Suite You Can Trust

In this quiz, you’ll test your understanding of Generating Python Tests With AI: A Suite You Can Trust. By working through this quiz, you’ll revisit how standing testing conventions guide an AI coding agent, why you review behavior tables b

Quiz: What Are Python Wheels and Why Should You Care?

In this quiz, you’ll test your understanding of What Are Python Wheels and Why Should You Care?. By working through this quiz, you’ll revisit how wheels compare to source distributions, how to read wheel filename tags, how to tell pip which