用python画一只蛇

from turtle import*
a=int(textinput("蛇的长度","范围在3—10"))
bgcolor("black")
penup()
goto(-200,0)
pendown()
pensize(20)
setheading(-40)
for i in range(a):
    color("red")
    circle(30,80)
    bgcolor("violet")
    color("blue")
    circle(-30,80)
    bgcolor("green")
setheading(0)
forward(30)
color("skyblue")
circle(30,180)
color("yellow","black")
forward(30)

你可能感兴趣的:(python,javascript,前端,c语言)