Commit 8ad283b4 by BellCodeEditor

auto save

parent 4fb4f4eb
Showing with 31 additions and 0 deletions
import turtle
#创建画笔
p = turtle.Pen()
#画笔颜色
p.color("red")
#设置笔的粗细
p.pensize(5)
#整体填充颜色
p.fillcolor("red")
#开始填充
p.begin_fill()
#画出圆心:
#先旋转45度
p.left(45)
#往前走100步
p.forward(100)
#画半圆,逆时针,半圆
p.circle(50,180)
#画另外一半
#先旋转方向
p.right(90)
#先画半圆
p.circle(50,180)
#直走
p.forward(100)
#结束填充
p.end_fill()
#画笔隐藏
p.hideturtle()
#保存画布
turtle.done()
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