Commit e213f45a by BellCodeEditor

auto save

parent 56028ade
Showing with 6 additions and 4 deletions
...@@ -3,13 +3,15 @@ ...@@ -3,13 +3,15 @@
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果 每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
""" """
import turtle import turtle
import random
pen=turtle.Pen() pen=turtle.Pen()
distance=1 turtle.bgcolor("black")
colors=["red","yellow","green","blue"]
for i in range(300): for i in range(300):
pen.speed(0) pen.speed(0)
pen.forward(distance) pen.pencolor(colors[i%4])
pen.left(123456789) pen.forward(i)
distance+=1 pen.left(91)
turtle.done() 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