Oct-06-2017, 01:19 PM
I tried this code for generating Koch's curve:
from turtle import * def koch(length, depth): if depth == 0: forward(length) else: koch(length/3, depth-1) right(60) koch(length/3, depth-1) left(120) koch(length/3, depth-1) right(60) koch(length/3, depth-1) koch(300, 2)I'm having hard time to write an iterative version of it. Any hints/helps?