Commit d2020fac by BellCodeEditor

auto save

parent e8205958
Showing with 7 additions and 4 deletions
......@@ -13,11 +13,13 @@ pen.hideturtle() # 调用hideturtle()方法隐藏画笔
pen1 = turtle.Pen() # 新建画笔Pen1
pen1.pencolor("red") # 设置线条的颜色
pen1.pensize(5) # 设置线条的粗细
# 借助变量
len = 40 # 用len表示圆的半径
pen1.left(45) # 左转45
pen1.forward(100) # 向前100
pen1.circle(50,180) # 画出半圆50,180
pen1.forward(2*len) # 向前2*len
pen1.circle(len,180) # 画出半圆len,180
pen1.right(90) # 右转90
pen1.circle(50,180) # 画出半圆50,180
pen1.forward(100) # 向前100
pen1.circle(len,180) # 画出半圆50,180
pen1.forward(2*len) # 向前100
pen1.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