其他分享
首页 > 其他分享> > 绘制一条彩色蟒蛇

绘制一条彩色蟒蛇

作者:互联网

#程序练习题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)
 

标签:turtle,彩色,pencolor,蟒蛇,fd,40,circle,绘制,80
来源: https://blog.csdn.net/TAO1031/article/details/118256437