diff --git a/.fractals.py.swp b/.fractals.py.swp new file mode 100644 index 0000000..219c86f Binary files /dev/null and b/.fractals.py.swp differ diff --git a/.whatsapp_automation.py.swp b/.whatsapp_automation.py.swp new file mode 100644 index 0000000..6d01dc5 Binary files /dev/null and b/.whatsapp_automation.py.swp differ diff --git a/fractal_tree.py b/fractal_tree.py new file mode 100644 index 0000000..5ced244 --- /dev/null +++ b/fractal_tree.py @@ -0,0 +1,31 @@ + +#python program for creating fractals +#install tkinter for it +#for debian based distribution +# sudo apt-get install python3-tk + + +import turtle + +def tree(branchLen,t): + if branchLen > 2: + t.forward(branchLen) + t.right(20) + tree(branchLen-15,t) + t.left(40) + tree(branchLen-15,t) + t.right(20) + t.backward(branchLen) + +def main(): + t = turtle.Turtle() + myWin = turtle.Screen() + t.left(90) + t.up() + t.backward(100) + t.down() + t.color("green") + tree(75,t) + myWin.exitonclick() + +main()