绘制一条彩色蟒蛇

2021/6/27 6:17:02

本文主要是介绍绘制一条彩色蟒蛇,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

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



这篇关于绘制一条彩色蟒蛇的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程