Commit 535f0516 by BellCodeEditor

save project

parent 70471911
Showing with 35 additions and 0 deletions
import turtle
import random
def tree(n):
if n>=50:
pen.pensize(n/10)
pen.forward(n)
angle=random.randint(0,30)
lenght=random.randint(1,15)
pen.right(30)
tree(n-lenght)
pen.left()
tree(n-lenght)
pen.right(30)
pen.up()
pen.backward(n)
pen.down()
pen=turtle.Turtle()
pen.color('sienna')
pen.speed(0)
w=turtle.Screen()
w.bgcolor("wheat")
pen.left(90)
pen.up()
pen.backward(150)
pen.down()
tree(60)
turtle.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