Add draw_square and draw_dashed_line with tests

Challenge 1 draws four sides and turns right 90 degrees after each. Challenge 2 puts
the pen down for a dash and up for a gap and leaves it down at the end. Lengths and
counts come from constants.py; invalid values raise ValueError.

Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
This commit is contained in:
2026-10-07 23:58:52 +08:00
parent e2249de46e
commit a34bf6bbc2
6 changed files with 217 additions and 1 deletions
+11 -1
View File
@@ -3,5 +3,15 @@
@brief Solutions to the turtle graphics challenges of day 18 of Udemy's
100 Days of Code.
The challenges are added one milestone at a time; see the README.
The challenges so far are @ref turtle_challenges.square.draw_square and
@ref turtle_challenges.dashed_line.draw_dashed_line. Each takes the turtle as its
first argument, so it can be tested without a window.
"""
from turtle_challenges.dashed_line import draw_dashed_line
from turtle_challenges.square import draw_square
__all__ = [
"draw_dashed_line",
"draw_square",
]