Commit 0dfc1866 by BellCodeEditor

save project

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