Define the Pen protocol and window helpers #9

Closed
opened 2026-10-07 18:01:38 +02:00 by Tirsvad · 0 comments
Owner

Add pen.py with a Pen protocol listing the turtle methods the challenges use, and helpers that create the Screen (color mode 255) and the Turtle named tim. The drawing functions take a Pen, so tests can pass a fake. The Doxygen comments also explain the import styles of the lecture (import turtle, from turtle import Turtle, import turtle as t) and why the wildcard import is avoided.

Phase: MIL-002

Add `pen.py` with a `Pen` protocol listing the turtle methods the challenges use, and helpers that create the `Screen` (color mode 255) and the `Turtle` named `tim`. The drawing functions take a `Pen`, so tests can pass a fake. The Doxygen comments also explain the import styles of the lecture (`import turtle`, `from turtle import Turtle`, `import turtle as t`) and why the wildcard import is avoided. Phase: MIL-002
Tirsvad added this to the Milestone 002: Square and Dashed Line milestone 2026-10-07 18:01:38 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100-days-of-code/018-turtle#9