用户:
TAT苏打水想喝苏打水查看:0 回复:0 评论:0 创建时间:2019-12-13T20:17:22
【作品展示】

【作品介绍】
滑稽脸,以后会把腮红和眉毛画上去
【作品源代码】
import turtle
tt = turtle.Pen()
#函数区
#眼眶函数
def yk():
tt.left(90)
tt.forward(50)
tt.right(90)
tt.forward(100)
tt.right(90)
tt.forward(50)
tt.right(90)
tt.forward(25)
tt.right(90)
tt.forward(25)
tt.left(90)
tt.forward(50)
tt.left(90)
tt.forward(25)
tt.right(90)
tt.forward(25)
# 眼珠函数
def yz():
tt.fillcolor('black')
tt.right(90)
tt.forward(50)
tt.right(90)
tt.forward(100)
tt.right(90)
tt.forward(50)
tt.right(90)
tt.forward(25)
tt.begin_fill()
for i in range(4):
tt.right(90)
tt.forward(25)
tt.end_fill()
#主程序
tt.fillcolor('yellow')
tt.penup()
tt.setheading(180)
tt.forward(25)
tt.left(90)
tt.forward(150)
tt.pendown()
tt.begin_fill()
tt.left(180)
for i in range(4):
tt.forward(300)
tt.right(90)
tt.end_fill()
tt.penup()
tt.goto(0,0)
tt.setheading(0)
tt.pendown()
yk()
yz()
tt.setheading(0)
tt.penup()
tt.forward(75)
tt.pendown()
yk()
yz()
tt.penup()
tt.forward(100)
tt.left(90)
tt.forward(100)
tt.pendown()
tt.right(90)
tt.forward(50)
tt.right(90)
tt.forward(50)
tt.setheading(-90)
tt.forward(50)
tt.left(90)
tt.forward(100)
tt.left(90)
tt.forward(50)
tt.hideturtle()
turtle.done()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn