#使用turtle编辑蟒蛇
#单色蟒蛇
import turtle as t
t.setup(650,350,200,200)
t.up()
t.fd(-300)
t.down()
t.pensize(25)
t.pencolor("green") #蟒蛇颜色
t.seth(-40)
for i in range(4): #扭曲的感觉
t.circle(40,80)
t.circle(-40,80)
t.circle(40,80/2)
t.fd(40)
t.circle(16,180)
t.fd(40 * 2/3)
t.done()
#彩蛇蟒蛇 import turtle as t
t.setup(650,350,200,200)
t.up()
t.fd(-300)
t.down()
t.pensize(25)
t.pencolor("green")
t.seth(-40)
for i in range(1): #与单色不同在用了多个for i in range编辑颜色
t.circle(40,80)
t.circle(-40,80)
t.pencolor("blue")
t.seth(-40)
for i in range(1):
t.circle(40,80)
t.circle(-40,80)
t.pencolor("red")
t.seth(-40)
for i in range(1):
t.circle(40,80)
t.circle(-40,80)
t.pencolor("purple")
t.seth(-40)
for i in range(1):
t.circle(40,80)
t.circle(-40,80)
t.circle(40,80/2)
t.fd(40)
t.circle(54,66)
t.fd(40 * 2/3)
t.done()