Add draw_spirograph with tests
Draws int(360 / size_of_gap) circles, each in a random RGB color, turning the heading by the gap after each. A gap that is not positive raises ValueError, and the integer count avoids the TypeError that range raises for a float. Task: MIL-004#2 Task: MIL-004#3
This commit is contained in:
@@ -77,6 +77,12 @@ WALK_PEN_SIZE = 10
|
||||
## Challenge 4: headings of a step: east, north, west and south, in degrees.
|
||||
WALK_HEADINGS: tuple[int, ...] = (0, 90, 180, 270)
|
||||
|
||||
## Challenge 5: radius of every circle of the spirograph, in turtle units.
|
||||
SPIROGRAPH_RADIUS = 100
|
||||
|
||||
## Challenge 5: degrees the heading turns after each circle.
|
||||
SPIROGRAPH_GAP_DEGREES = 5
|
||||
|
||||
## Command line name of challenge 1.
|
||||
CHALLENGE_SQUARE = "square"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user