Commit 2800c3e0 by BellCodeEditor

auto save

parent bae41ef6
Showing with 30 additions and 0 deletions
import turtle
p = turtle.Turtle()
p.color('sienna')
# 画布大小
w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦
# 移动到起点
p.left(90)
p.up()
p.backward(150) # 后退
p.down()
def tree(n):
if n>=20:
p.forward(n)
p.right(30)
tree(n-20)
#p.backward(50)
p.left(60)
tree(n-20)
#p.backward(50)
p.right(30)
p.up()
p.backward(n)
p.down()
tree(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