Commit e213f45a by BellCodeEditor

auto save

parent 56028ade
Showing with 7 additions and 5 deletions
......@@ -3,13 +3,15 @@
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
"""
import turtle
import random
pen=turtle.Pen()
distance=1
turtle.bgcolor("black")
colors=["red","yellow","green","blue"]
for i in range(300):
pen.speed(0)
pen.forward(distance)
pen.left(123456789)
distance+=1
pen.pencolor(colors[i%4])
pen.forward(i)
pen.left(91)
turtle.done()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment