Skip to content

Commit

Permalink
Merge pull request #928 from akshat-fsociety/master
Browse files Browse the repository at this point in the history
Recursion Visualizer
  • Loading branch information
geekcomputers authored Oct 3, 2020
2 parents 303069d + f9f9e5c commit f3b212f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Recursion Visulaizer/recursionVisualizer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import turtle
t = turtle.Turtle()
t.left(90)
t.speed(200)

def tree(i):
if i<10:
return
else:
t.forward(i)
t.left(30)
tree(3*i/4)
t.right(60)
tree(3*i/4)
t.left(30)
t.backward(i)

tree(100)
turtle.done()

0 comments on commit f3b212f

Please sign in to comment.