2022虎年画虎,趣味小程序
#画虎
import turtle as t
t.penup()
#绘制大脸
t.goto(-40,-60)
t.pendown()
#t.left(120)
t.fillcolor("yellow")
t.begin_fill()
t.circle(150,30)
t.circle(50,60)
t.circle(100,90)
t.circle(100,90)
t.circle(50,60)
t.circle(150,30)
t.end_fill()
#绘制胡须
t.penup()
t.left(0)
t.goto(-110,-20)
t.pendown()
t.fd(-80)
t.penup()
t.left(10)
t.goto(-90,-30)
t.pendown()
t.fd(-70)
t.penup()
t.left(-10)
t.goto(30,-20)
t.pendown()
t.fd(80)
t.penup()
t.left(-10)
t.goto(20,-30)
t.pendown()
t.fd(70)
#绘制鼻子
t.penup()
t.left(20)
t.goto(-30,-30)
t.pendown()
t.circle(20,80)
t.circle(5,60)
t.circle(30,60)
t.circle(5,60)
t.circle(20,80)
t.circle(5,60)
#绘制嘴巴
t.penup()
t.left(10)
t.goto(-30,-30)
t.pendown()
t.circle(20,-40)
t.circle(30,-30)
t.circle(20,-40)
t.penup()
t.left(-10)
t.goto(-30,-30)
t.pendown()
t.cir