import turtle
turtle.speed(15)
#大脸
turtle.setup(800,600)
turtle.pendown()
turtle.colormode(255)
turtle.fillcolor(0,128,255)
turtle.begin_fill()
turtle.left(44)
turtle.circle(100,270)
turtle.end_fill()
#脖子
turtle.pensize(20)
turtle.pencolor("red")
turtle.setheading(0)
turtle.fd(148)
#小脸
turtle.pensize(1)
turtle.penup()
turtle.color("blue")
turtle.fillcolor("white")
turtle.begin_fill()
turtle.left(59)
turtle.circle(88,241)
turtle.end_fill()
#眼睛
turtle.goto(-75,140)
turtle.setheading(90)
turtle.pendown()
turtle.fillcolor("white")
turtle.begin_fill()
turtle.circle(20,360)
turtle.end_fill()
turtle.setheading(0)
turtle.pendown()
turtle.fillcolor("white")
turtle.begin_fill()
turtle.pendown
turtle.left(-85)
turtle.circle(20,360)
turtle.end_fill()
turtle.setheading(0)
turtle.penup()
turtle.fd(10)
turtle.pendown()
turtle.colormode(255)
turtle.fillcolor(0,128,255)
#turtle.fillcolor("blue")
turtle.begin_fill()
turtle.left(-85)
turtle.circl
菜鸟编程:python中turtle绘制机器猫
最新推荐文章于 2024-04-11 21:37:00 发布
编程新手利用turtle库简单学习后的实践,展示了如何用Python的turtle模块绘制出机器猫,涵盖了turtle库的基础操作。
摘要由CSDN通过智能技术生成