Commit 1f0acb9d by BellCodeEditor

auto save

parent 44e408d4
Showing with 3 additions and 2 deletions
import turtle
import random
pen = turtle.Turtle()
pen.color('sienna')
# 画布大小
......@@ -14,7 +15,7 @@ pen.backward(150) # 后退
pen.down()
def tree(n):
if n>=0:
if n>=8:
if n < 12:
list=["snow","lightcoral"]
color=random.choice(list)
......@@ -34,7 +35,7 @@ def tree(n):
pen.up()
pen.backward(n)
pen.down()
tree(80)
tree(75)
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