1 2 3 4 5 6 7 8 9 10 11 | import turtle t = turtle.Turtle() length = 30 for n in range(7) : for m in range (4) : if(m % 2 == 0) : length += 30 t.forward(length) t.left(90) | cs |
1 2 3 4 5 6 7 8 9 10 11 12 13 | import turtle t = turtle.Turtle() colors = ['red', 'blue', 'black', 'green'] length = 30 for n in range(7) : for m in range (4) : t.color(colors[m]) if(m % 2 == 0) : length += 30 t.forward(length) t.left(90) | cs |