Commit 4617a867 by BellCodeEditor

auto save

parent 1bad0edb
Showing with 9 additions and 19 deletions
# 悟空想海龟作图画出弹簧隧道,但是出现了bug,运行不了,请你帮助他,修改bug~ import turtle
import turtle # 递归绘制螺旋线
def drawSpiral(lineLength):
pen=turtle.Pen() if lineLength > 0:
screen=turtle.Screen() turtle.forward(lineLength)
pen.speed() turtle.right(90)
pen.hideturtle() drawSpiral(lineLength-5)
screen.bgcolor('black')
i=0
while i<135:
pen.pencolor('pink')
pen.penup()
pen.goto(0,0)
pen.forward(200)
pen.pendown()
pen.circle(100)
pen.left(2)
i+=1
drawSpiral(100)
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