import turtle, math, random def funny(t1, t2, n): for i in range(n): s1 = random.randint(10,20) s2 = random.randint(10,20) a1 = 45*random.randint(0,7) a2 = 45*random.randint(0,7) for j in range(4): t1.left(a1) t2.left(a2) t1.forward(s1) t2.forward(s2) t1.left(90) t2.left(90) return #-------- t1 = turtle.Turtle() t1.color("blue") t2 = turtle.Turtle() t2.color("red") funny(t1,t2,20)