标签:五个 done 使用 定义 red war 优化 src 条件
import turtle
def concentric(i):
turtle.up()
turtle.goto(0,-20*(i+1))
turtle.down()
turtle.circle(20*(i+1))
for i in range(5):
concentric(i)
import turtle
turtle.color("yellow","red")
turtle.begin_fill()
while True:
turtle.forward(200)
turtle.left(170)
if (abs(turtle.pos()))<1:
break
turtle.end_fill()
done()
import turtle
turtle.color(‘yellow‘)
turtle.bgcolor(‘red‘)
turtle.fillcolor(‘yellow‘)
def mygoto(x,y):
turtle.up()
turtle.goto(x,y)
turtle.down()
mygoto(-230,130)
turtle.begin_fill()
for i in range(5):
turtle.forward(100)
turtle.right(144)
turtle.end_fill()
mygoto(-110,200)
turtle.begin_fill()
for i in range(5):
turtle.forward(40)
turtle.left(144)
turtle.end_fill()
mygoto(-75,150)
turtle.begin_fill()
for i in range(5):
turtle.forward(40)
turtle.left(144)
turtle.end_fill()
mygoto(-65,90)
turtle.begin_fill()
for i in range(5):
turtle.forward(40)
turtle.left(144)
turtle.end_fill()
mygoto(-90,30)
turtle.begin_fill()
for i in range(5):
turtle.forward(40)
turtle.left(144)
turtle.end_fill()
标签:五个 done 使用 定义 red war 优化 src 条件
原文地址:http://www.cnblogs.com/Carrie-chong/p/7508549.html