效果图如下:
代码如下:
import turtlet = turtle.Turtle()t.speed(0)# 右眼睛t.up()t.goto(80,80)t.down()t.begin_fill()t.circle(20)t.end_fill()# 右眉毛t.up()t.left(40)t.goto(50,120)t.down()t.circle(-50,90)t.up()t.seth(0)# 左眼睛t.goto(-80,80)t.down()t.begin_fill()t.circle(20)t.end_fill()# 左眉毛t.up()t.left(40)t.goto(-110,120)t.down()t.circle(-50,90)t.up()# 重置画笔角度t.seth(0)# 鼻子t.up()t.goto(0,40)t.down()t.color('red')t.begin_fill()t.circle(-40,steps=3)t.end_fill()# 嘴巴t.up()t.color('black')t.goto(-80,-40)t.down()t.right(30)t.fd(90)t.left(60)t.fd(90)t.up()t.goto(0,-110)t.down()t.right(30)t.circle(150)# 身体左边t.left(180)t.circle(200,90)# 身体右边t.up()t.goto(0,-110)t.down()t.seth(0)t.circle(-200,90)# 隐藏画笔t.ht()