title: Repeating function in Python turtle
body: <p>I am working on an assignment for school and want to draw a large building with repeating windows. I now you would probably use a for loop for the windows to repeat, but I don't know how to set it up. Any help would be great! Here is my code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import turtle
  
  def draw_rectangle(t, x, y, width, height, tilt, pen, fill):
      t.hideturtle()
      t.up()
      t.goto(x,y)
      t.setheading(0 + tilt)
      t.fillcolor(fill)
      t.pencolor(pen)
      
      t.down()
      t.begin_fill()
      t.forward(width)
      t.left(90)
      t.forward(height)
      t.left(90)
      t.forward(width)
      t.left(90)
      t.forward(height)
      t.end_fill()
      t.up()
      
      t.down()
      t.begin_fill()
      draw_rectangle(t, -80, 100, 20, 30, 0, "white", "white")
      t.end_fill()
      t.up()</code></pre>
  </div>
  </div>
  </p>