day-09-homework
- 使用turtle绘制小黄人,并打包成可执行文件
- 绘制小黄人代码:
import turtle as t
# 画小黄人
t.speed(0)
t.setup(800, 600)
t.screensize(800, 700)
t.pensize(1)
# 画头和身体
t.fillcolor('yellow')
t.penup()
t.goto(150, 160)
t.setheading(90)
t.pendown()
t.begin_fill()
t.circle(150, 180)
t.goto(-150, -160)
t.goto(150, -160)
t.goto(150, 160)
t.end_fill()
# 画背带裤
t.fillcolor('grey')
t.penup()
t.goto(-150, -160)
t.setheading(-90)
t.pendown()
t.begin_fill()
t.circle(150, 180)
t.goto(100, -160)
t.goto(100, -100) #背带裤右上顶角
t