-
-
Save stephengruppetta/1807f5bf22bb1f9e799ea6265a7fbd7a 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.tracer(0) | |
window.setup(700, 700) | |
window.bgcolor(0.2, 0.2, 0.2) | |
# Create and customise the turtles | |
cute_turtles = [ | |
( | |
cute_turtle = turtle.Turtle(), | |
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 in range(n_turtles) | |
] | |
window.update() | |
turtle.done() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment