Just for fun:
from turtle import Turtle
from random import randint
t = Turtle()
scale = 5
def fib(n):
if n == 0:
return 0
if n == 1:
return 1
return fib(n-1) + fib(n-2)
def semi_circle(radius):
rgb = [randint(0, 255) for i in range(3)]
t.color(*rgb)
t.circle(radius, 90)
for i in range(10):
semi_circle(fib(i) * scale)
Result:
Top comments (0)