Commit 17de45f4 by BellCodeEditor

auto save

parent 251b0273
Showing with 4 additions and 3 deletions
import turtle
import random
def tree(n):
if n >= 10:
if n > 10:
if n<=12:
color_list=['snow','lightcoral']
color = random.choice(color_list)
......@@ -24,7 +24,7 @@ def tree(n):
pen = turtle.Turtle()
pen.color('sienna')
pen.speed(30)
pen.speed(20)
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
......@@ -35,6 +35,6 @@ pen.up()
pen.backward(150) # 后退
pen.down()
tree(65)
tree(60)
turtle.down
\ 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