title: Python: Drawing a rectangle around center coordinates given by user while using imported height and width
body: <p>I have been trying to figure this out all day. How to draw a rectangle around the x,y coordinates given for the center of the rectangle all the while using the Height and width given from the user. any help would be amazing.</p>
  
  <pre><code>import turtle
  
  
  centerX = float(input("Enter the center x cordinates of the rectangle: "))
  centerY = float(input("Enter the center y cordinates of the rectangle: "))
  width = float(input("enter, width: "))
  height = float(input("enter, height: "))
  
  
  turtle.showturtle()
  
  turtle.penup()
  turtle.goto(centerX,centerY)
  turtle.pendown()
  turtle.goto(-width/2,centerY)
  turtle.goto(-width/2,height/2)
  turtle.goto(width,height/2)
  turtle.goto(width,-height)
  turtle.goto(-width,-height)
  turtle.goto(-width,height/2)
  </code></pre>