# 初始设置 import turtle as t t.bgcolor('orange') # 橙色背景 t.pensize(5) # 画笔宽度为5 # 画方脸 t.fillcolor('blue') t.begin_fill() for i in range(4): t.forward(100) t.left(90) t.end_fill() # 不画线,移到(30,20) t.penup() t.goto(30,20) t.pendown() # 画三角形嘴巴 t.fillcolor('red') t.begin_fill() for i in range(3): t.forward(40) t.left(120) t.end_fill() # 不画线,移到(20,80) t.penup() t.goto(20,80) t.pendown() # 画左眼睛 t.dot(20) # 不画线,移到(80,80) t.penup() t.goto(80,80) t.pendown() # 画右眼睛 t.dot(20) t.hideturtle() # 下节课学习,想使用的话可以提前给孩子们介绍一下 t.done()