Commit 7a6f2254 by BellCodeEditor

save project

parent 479727b2
Showing with 6 additions and 4 deletions
#画风车第二种方法
#画风车第3种方法 列表
import turtle
pen = turtle.Pen()
screen = turtle.Screen()
screen.bgcolor("black")
colors = ["green","red","orange","yellow"]#创建列表
for i in range(0,300):
pen.forward(i)#利用for循环参数
pen.forward(i)
pen.pencolor(colors[i%4])#利用colours项目
pen.right(91)
# 隐藏画笔,保存画布
pen.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