-
-
Save stephengruppetta/a15305a0d723dbc60661403280d30f08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not try this at home… | |
import turtle | |
import random | |
# Starts off fairly "normal"… | |
n_turtles = 100 | |
window = turtle.Screen() | |
window.setup(700, 700) | |
window.bgcolor(0.2, 0.2, 0.2) | |
# Create and customise the turtles | |
cute_turtles = [turtle.Turtle() for _ in range(n_turtles)] | |
[ | |
( | |
cute_turtle.left(idx * (360 / n_turtles)), | |
cute_turtle.color( | |
random.random(), | |
random.random(), | |
random.random(), | |
), | |
cute_turtle.penup(), | |
cute_turtle.shape("turtle"), | |
) | |
for idx, cute_turtle in enumerate(cute_turtles) | |
] | |
turtle.done() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment