python彩色分段蟒蛇绘制
代码如下:
import turtle
turtle.setup(500,200)
turtle.penup()
turtle.goto(-200,-30)
turtle.pendown()
turtle.pensize(20)
turtle.seth(35)
for i in range(5):
turtle.pencolor('pink')
turtle.circle(-30,70)
turtle.pencolor('yellow')
turtle.circle(30,70)
turtle.circle(30,35)
turtle.pencolor('purple')
turtle.fd(50)
turtle.pencolor('gray')
turtle.circle(-25,110)
运行结果如下: