Commit 98e3a5f4 by BellCodeEditor

auto save

parent 35ebe232
Showing with 15 additions and 8 deletions
import turtle
open=turtle.pen()
For i in range(5)
pen.forward(200)
pen.right(144)
pen.hideturtle()
pen.done()
\ No newline at end of file
p=turtle.Pen()
p.speed(20)
s=turtle.Screen() #定义画布
s.bgcolor("black") #设置画布背景颜色
color=["red","orange","blue","yellow","green"] #存储颜色
for i in range(500):
p.pencolor(color[i%4]) #每次边的颜色
p.forward(i) #每次前进的距离
p.right(91) #每次旋转的角度
p.hideturtle() #隐藏画笔
turtle.done() #保留画布
\ 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