Commit 9c49ab2a by BellCodeEditor

save project

parent d0b539c7
Showing with 15 additions and 5 deletions
......@@ -8,23 +8,33 @@ w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
# 移动到起点
t.speed(0)
t.left(90)
t.up()
t.backward(150) # 后退
t.down()
def shu(n):
if n >= 50:
if n >= 0:
if n<=12:
li=['snow','lightcoral']
se=random.choice(li)
t.color(se)
t.pensize(n/3)
else:
t.color('sienna')
t.pensize(n/10)
t.pensize(n/10)
t.forward(n)
jiao=random.randint(0,30)
chang=random.randint(1,15)
chang=random.randint(5,15)
t.right(jiao)
shu(n-10)
shu(n-chang)
t.left(2*jiao)
shu(n-10)
shu(n-chang)
t.right(jiao)
t.penup()
t.backward(n)
t.pendown()
shu(100)
shu(80)
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