import turtle as t
t.shape("arrow")
t.bgcolor("black")
t.color("pink")
t.pensize(width=3)
t.speed(0)
n = 10
colors = ["red", "yellow", "blue"]
for i in range(3):
t.color(colors[i])
t.left(120)
for x in range(n):
t.circle(100)
t.left(360/n)
t.exitonclick()
import turtle as t: This means t will mean turtle from now.
t.shape("arrow"):This code means that the shape of the pen will be an arrow.
t.bgcolor("black"):This code means that the color the of background will be black.
t.color("pink"):The color of the pen will be pink.
t.pensize(width=3):The width of the pen will be 3.
n = 10: Set n to 10.
colors = ["red", "yellow", "blue"]: The colors will be red, yellow, and blue.
for i in range(3):
t.color(colors[i])
t.left(120)
for x in range(n):
t.circle(100)
t.left(360/n)
: This means that the code will be repeated 10 times with each color red, yellow and blue.
For 10 times, the turtle draw a circle that radius is 100 and turn left by 36 degrees.
t.exitonclick(): The final thing that says exit on click means that the app will close when clicked.