# -*- coding: utf-8 -*- import turtle win = turtle.Screen() win.setup(0.9,0.9) ###### def drawFiboTree(n, ang, t): """Draw a Fibonacci Tree""" if n < 5: t.pencolor('green') else: t.pencolor('black') t.fd(n*10) if n == 0: pass elif n==1: pass else: t.left(ang) drawFiboTree(n-1, ang*(n-1)/n, t) t.right(2*ang) drawFiboTree(n-2, ang*(n-2)/n, t) t.left(ang) t.up() t.back(n*10) t.down() tt = turtle.Turtle() tt.speed(0) tt.up() tt.sety(-350) tt.left(90) tt.pd() drawFiboTree(10, 25, tt) ###### win.exitonclick()