代码如下: import turtle def main(): t = turtle.Turtle() t.hideturtle() t.speed(10) level = 12 fract(t,-80,60,80,60,level) def fract(t,x1,y1,x2,y2,level): newX = 0 newY = 0 if level == 0: drawLine(t,x1,y1,x2,y2) else: newX = (x1+x2)/2 + (y2-y1)/2 newY = (…