0


python:画一条彩色的蟒蛇(源码)

import turtle
turtle.setup(650,350,200,200)
turtle.penup()
turtle.fd(-250)
turtle.pendown()
turtle.pensize(25)
turtle.seth(- 40)
c = ["pink","blue","green","grey","red","golden"]
for i in range(4):
turtle.pencolor(c[i])
turtle.circle(40,80)
turtle.circle(- 40,80)
turtle.pencolor("gold")
turtle.circle(40,80/2)
turtle.fd(40)
turtle.circle(16,180)
turtle.fd(40*2/3)

turtle.done()

效果如图:

标签: python

本文转载自: https://blog.csdn.net/qq_46468611/article/details/120474345
版权归原作者 沈九黎黎黎黎黎 所有, 如有侵权,请联系我们删除。

“python:画一条彩色的蟒蛇(源码)”的评论:

还没有评论