Implement random_color #16

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

Implement random_color(rng) in colors.py: three random integers from 0 to 255 returned as a tuple (immutable, so it is safe as a constant-like value). It accepts an optional random.Random so tests can seed it. The upper bound comes from constants.py.

Phase: MIL-003

Implement `random_color(rng)` in `colors.py`: three random integers from 0 to 255 returned as a tuple (immutable, so it is safe as a constant-like value). It accepts an optional `random.Random` so tests can seed it. The upper bound comes from `constants.py`. Phase: MIL-003
Tirsvad added this to the Milestone 003: Shapes and Random Color milestone 2026-10-07 18:01:57 +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#16