绘制一条彩色蟒蛇

#程序练习题2.3
import turtle
turtle.setup(650,350,200,200)
turtle.penup()
turtle.fd(-250)
turtle.pendown()
turtle.pensize(25)
turtle.pencolor("blue")
turtle.seth(-40)
for i in range(4):
    turtle.pencolor("blue")
    turtle.circle(40,80)
    turtle.pencolor("red")
    turtle.circle(-40,80)
turtle.pencolor("purple")
turtle.circle(40,40)
turtle.pencolor("black")
turtle.fd(40)
turtle.pencolor("violet")
turtle.circle(16,180)
turtle.pencolor("gold")
turtle.fd(40*2/3)
 

上一篇:构造方法问题与一些系统化补充


下一篇:画太极图