Commit f64ca328 by BellCodeEditor

auto save

parent df1dd66f
Showing with 3 additions and 4 deletions
import turtle # 导入turtle模块
pen = turtle.Pen() # 创建画笔
distance = 1 # 建立变量distance设为1
for i in range(300): # for循环用range()方法重复执行300次
pen.forward(distance) # 变量distance表示画笔移动的距离
distance+=1 # 每次循环变量distance增加1
for i in range(1,300):
pen.forward(i) # 变量1表示画笔移动的距离
pen.right(91) # 右转91
pen.hideturtle() # 隐藏画笔
turtle.done() # 暂停重新,停止画笔绘制 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