Commit 4925d9a2 by BellCodeEditor

save project

parent 6bb0fe8b
Showing with 13 additions and 6 deletions
import turtle import turtle
pen = turtle.Turtle() p= turtle.Turtle()
pen.color('sienna') p.color('sienna')
# 画布大小 # 画布大小
w = turtle.Screen() w = turtle.Screen()
w.bgcolor('wheat') # wheat小麦 w.bgcolor('wheat') # wheat小麦
# 移动到起点 # 移动到起点
pen.left(90) p.left(90)
pen.up() p.up()
pen.backward(150) # 后退 p.backward(150) # 后退
pen.down() p.down()
def tree():
p.fd(100)
p.right(30)
tree()
p.backward(50)
tree()
turtle.done() 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