title: How do I draw polygons around a center point in python turtle
body: <p>i want to define this function such that the user can input any number of sides, length and coordinates. The problem im facing is that I want the coordinates to be the center of the polygon, not the corner but Im unsure how. Below is my current code</p>
  <pre><code>import turtle
  
  WIDTH,HEIGHT= 1200,700
  screen = turtle.Screen()
  screen.setup(WIDTH,HEIGHT)
  
  def draw_polygon(x,y,sides,length):
      pen=turtle.Turtle()
      pen.hideturtle()
      pen.speed(-1)
      pen.penup()
      pen.setpos(x,y)
      pen.pendown()
      for i in range (0,sides):
          pen.fd(length)
          pen.right(360/sides)
  
  while True:
      s=int(input())
      l=int(input())
      draw_polygon(0,0,s,l)
  </code></pre>