Commit 7c43eea9 by BellCodeEditor

auto save

parent 9ac09744
Showing with 13 additions and 15 deletions
import turtle
def t(n):
if n>=50:
pen.pd()
pen.fd(n)
pen.right(30)
t(n-10)
pen.left(60)
t(n-10)
pen.right(30)
pen.pu()
pen.backward(n)
pen = turtle.Turtle()
pen.speed(0)
pen.color('sienna')
# 画布大小
w = turtle.Screen()
......@@ -10,18 +21,5 @@ w.bgcolor('wheat') # wheat小麦
pen.left(90)
pen.up()
pen.backward(150) # 后退
pen.down()
pen.fd(100)
pen.right(30)
pen.fd(50)
pen.pu()
pen.backward(50)
pen.left(60)
pen.pd()
pen.fd(50)
pen.pu()
pen.backward(50)
pen.right(30)
pen.backward(100)
pen.pd()
print(t(100))
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