title: How to draw a 9x9 grid in Python
body: <p>I'm trying to draw a 9x9 grid in python using turtle graphics. I know that I need to use two for loops, one for the vertical lines and one for the horizontal lines. However, the only thing that I can get is a large square on the screen. When I try to draw the lines, I get an error. This is my program so far:</p>
  
  <pre><code>def main():
  
      import turtle
      x=turtle.Turtle()
      x.penup()
      x.goto(-300,300)
      x.pendown()
      for i in range(4):
          x.forward(600)
          x.right(90)
  
  main()
  </code></pre>
  
  <p>Can someone help me draw the grid?</p>