<filename>examples/introduction.to.programming.with.turtle/windows_only/5-2-4.Inner.triangle.py<gh_stars>1-10
from easygraphics.turtle import *


def inner_tri(size, level):
    if level == 0:
        return
    fd(size / 2)
    rt(60)
    inner_tri(size / 2, level - 1)
    lt(60)
    fd(size / 2)

    rt(120)
    fd(size)
    rt(120)
    fd(size)
    rt(120)


create_world(800, 600)
set_speed(100)

setxy(-300, -250)
rt(30)

inner_tri(600, 6)

pause()
close_world()
