Commit 86c78483 by BellCodeEditor

save project

parent b8e0f2ec
Showing with 10 additions and 7 deletions
...@@ -3,15 +3,18 @@ ...@@ -3,15 +3,18 @@
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果 每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
""" """
import turtle import turtle
import random
c=["red","orange","green","blue"]
pen = turtle.Pen() pen = turtle.Pen()
L=1 L=1
pen.speed(100000000) pen.speed(100000000)
for i in range((114+514)): for i in range((114+514)):
i+=1
pen.pencolor(c[L%4])
pen.forward(i) pen.forward(i)
pen.right(91) pen.right(92)
pen.speed(L) pen.speed(L)
i+=1
L+=0.4 L+=5
turtle.down() turtle.down()
\ No newline at end of file #random.choice(c)
\ No newline at end of file
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