Commit 957f6e30 by BellCodeEditor

save project

parent bbd0cc77
Showing with 13 additions and 8 deletions
......@@ -8,20 +8,25 @@
# alist[j] , alist[j+1] = alist[j+1] , alist[j]
# print(alist)
import turtle as t
import random
def tree(n):
if n>=50:
if n>=20:
# t.size(n/10)
t.forward(n)
t.right(30)
tree(n-10)
t.left(60)
tree(n-10)
t.right(30)
angle=random.randint(0,30)
lenght=random.randint(1,15)
t.right(angle)
tree(n-lenght)
t.left(2*angle)
tree(n-lenght)
t.right(angle)
t.up()
t.backward(n)
t.down()
t.goto(0,0)
# t.goto(0,0)
t.left(90)
tree(100)
tree(70)
# t.forward(100)
# t.left(30)
# t.forward(50)
......
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