Commit 027e7f5f by BellCodeEditor

save project

parent 73f64513
Showing with 17 additions and 7 deletions
import turtle
def Draw(long, max=10):
if long >= max:
pen.forward(long)
pen.right(30)
Draw(long - 10)
pen.left(60)
Draw(long - 10)
pen.right(30)
pen.up()
pen.backward(long)
pen.pendown()
pen = turtle.Turtle()
pen.color('sienna')
# 画布大小
......@@ -12,11 +26,8 @@ pen.up()
pen.backward(150) # 后退
pen.down()
turtle.done()
def Draw():
pen.forward(150)
pen.penup()
pen.backward(150)
Draw(100)
Draw()
\ No newline at end of file
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