Commit 73425e1b by BellCodeEditor

auto save

parent 4ef302e5
Showing with 56 additions and 0 deletions
#导入模块
import turtle
import math
#创建画笔
p = turtle.Pen()
p.speed(1000)
#起点坐标为(0,-200)
p.penup()
p.goto(0,-200)
p.pendown()
#画半径为200的圆
p.circle(200)
#左眼
p.penup()
p.goto(-100,50)
p.pendown()
p.fillcolor("blue")
p.begin_fill()
p.circle(20)
p.end_fill()
#右眼
p.penup()
p.goto(100,50)
p.pendown()
p.fillcolor("blue")
p.begin_fill()
p.circle(20)
p.end_fill()
#鼻子
p.penup()
p.goto(0,50)
p.pendown()
#内切三角形的边长
len = (math.sqrt(3))*50
p.right(60)
p.forward(len)
p.right(120)
p.forward(len)
p.right(120)
p.forward(len)
#嘴角
p.penup()
p.goto(-150,-70)
p.pendown()
p.goto(0,-170)
p.goto(150,-70)
p.hideturtle()
turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment