Commit bbd0cc77 by BellCodeEditor

save project

parent 20d04074
Showing with 22 additions and 8 deletions
...@@ -8,14 +8,27 @@ ...@@ -8,14 +8,27 @@
# alist[j] , alist[j+1] = alist[j+1] , alist[j] # alist[j] , alist[j+1] = alist[j+1] , alist[j]
# print(alist) # print(alist)
import turtle as t import turtle as t
def tree(n):
if n>=50:
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.goto(0,0) t.goto(0,0)
t.left(90) t.left(90)
t.forward(100) tree(100)
t.left(30) # t.forward(100)
t.forward(50) # t.left(30)
t.up() # t.forward(50)
t.goto(0,100) # t.up()
t.down() # t.goto(0,100)
t.right(60) # t.down()
t.forward(50) # t.right(60)
# t.forward(50)
t.done() t.done()
\ 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