Add random_color and the color palette
random_color returns an immutable (red, green, blue) tuple of integers from 0 to 255 and random_palette_color picks a named color. Both take an optional random.Random so that tests can seed them. Task: MIL-003#1 Task: MIL-003#2
This commit is contained in:
@@ -8,10 +8,13 @@ The challenges so far are @ref turtle_challenges.square.draw_square and
|
||||
first argument, so it can be tested without a window.
|
||||
"""
|
||||
|
||||
from turtle_challenges.colors import random_color, random_palette_color
|
||||
from turtle_challenges.dashed_line import draw_dashed_line
|
||||
from turtle_challenges.square import draw_square
|
||||
|
||||
__all__ = [
|
||||
"draw_dashed_line",
|
||||
"draw_square",
|
||||
"random_color",
|
||||
"random_palette_color",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user