赞
踩
调用 turtle库函数绘制太阳花,先看成品
代码如下
import turtle
turtle.setup(650, 350, 200, 200)
turtle.penup()
turtle.fd(-250)
turtle.pendown()
turtle.pensize(1)
turtle.speed(10)
turtle.pencolor("red")
turtle.fillcolor("yellow")
turtle.begin_fill()
for i in range(36):
turtle.fd(200)
turtle.right(170)
turtle.end_fill()
turtle.done()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。