Commit 53c56a07 by BellCodeEditor

save project

parent bae41ef6
Showing with 32 additions and 0 deletions
import turtle
import random
def tree(n):
if n >= 10:
t.forward(n)
t.right(30)
tree(n - 10)
t.left(60)
tree(n - 10)
t.right(30)
t.up()
t.backward(n)
t.down()
t = turtle.Turtle()
t.color('sienna')
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
t.left(90)
t.up()
t.backward(150)
t.down()
tree(60)
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