title: How to move text around when using turtle.write in Python?
body: <p>I am trying to solve Exercise 9 from Chapter 5 of 'Think Python' ( version: <a href="http://openbookproject.net/thinkcs/python/english3e/conditionals.html" rel="nofollow noreferrer">http://openbookproject.net/thinkcs/python/english3e/conditionals.html</a> ). It involves moving text from turtle.write around so it doesn't overlap with the barchart when the values are negative. I have tried using triple quotation marks """like this""" in order to add an extra row before the text, but the extra row goes in the wrong place. Please help?</p>
  
  <pre><code>import turtle
  wn=turtle.Screen()
  wn.bgcolor("lightgreen")
  wn.title("Barcharts FTW")
  pen=turtle.Turtle()
  pen.hideturtle()
  pen.color("blue","red")
  pen.pensize(2)
  pen.penup()
  pen.goto(-300,-100)
  
  def draw_bar (t,height):
      t.pendown()
      t.begin_fill()
      t.lt(90)
      t.fd(height)
      t.write("   " + str(height))
      t.rt(90)
      t.fd(40)
      t.rt(90)
      t.fd(height)
      t.end_fill()
      t.lt(90)
      t.penup()
      t.fd(10)
  
  xs = [48, 117, 200, 240, -160, 260, 220]
  for v in xs:
      draw_bar(pen,v)
  
  wn.mainloop()
  </code></pre>