title: Let a user draw any number using turtle
body: <p>I'm making a script in python that is supposed to let the user enter any number and it will be drawn on the screen. Right now, the code I have won't draw the numbers and is only print 0.99999... I'm not getting error messages, so I'm unsure of what I should be editing to get this thing working. Help would be appreciated.</p>
  
  <pre><code>number = int(input("Pick a number"))
  print (number) #Number is definitley a number
  
  moveto(-500,0)
  for i in range(1,len(str(number))+1):
      digit = ((number % (10 ** i) - (number % 10 ** i - 1)) / 10 ** i - 1)
      print(digit)
      drawnum(digit)
  </code></pre>
  
  <p>And here's the library I'm importing from.</p>
  
  <pre><code>from turtle import *
  
  def moveto(x,y):
      pu()
      goto(x,y)
      pd()
      setheading(0)
  
  #x and y let the user place their numbers down, d is length of sides.
  def nine(d):
      point = pos()
      fd(d)
      rt(90)
      fd(d*2)
      bk(d)
      rt(90)
      fd(d)
      rt(90)
      fd(d)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def eight(d):
      point = pos()
      fd(d)
      rt(90)
      fd(d*2)
      for i in range(3):
          rt(90)
          fd(d)
      bk(d)
      lt(90)
      fd(d)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def seven(d):
      point = pos()
      fd(d)
      rt(90)
      fd(d*2)
      bk(d*2)
      lt(90)
      bk(d)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def six(d):
      point = pos()
      fd(d)
      bk(d)
      rt(90)
      fd(d*2)
      for i in range(3):
          lt(90)
          fd(d)
      rt(90)
      fd(d)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def five(d):
      point = pos()
      fd(d)
      bk(d)
      rt(90)
      fd(d)
      lt(90)
      fd(d)
      for i in range(2):
          rt(90)
          fd(d)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def four(d):
      point = pos()
      rt(90)
      fd(d)
      for i in range(2):
          lt(90)
          fd(d)
      bk(d * 2)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def three(d):
      point = pos()
      for i in range(2):
          fd(d)
          rt(90)
      fd(d)
      for i in range(2):
          bk(d)
          rt(90)
      bk(d)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def two(d):
      point = pos()
      fd(d)
      rt(90)
      fd(d)
      lt(90)
      for i in range(2):
          bk(d)
          lt(90)
      bk(d)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def one(d):
      point = pos()
      pu()
      fd(d)
      pd()
      rt(90)
      fd(d*2)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def zero(d):
      point = pos()
      fd(d)
      rt(90)
      fd(d*2)
      rt(90)
      fd(d)
      rt(90)
      fd(d*2)
      pu()
      goto(point)
      pd()
      setheading(0)
  
  def drawnum(n):
      d=100
      if (n == 1):
          one(d)
      if (n ==2):
          two(d)
      if (n==3):
          three(d)
      if (n==4):
         four(d)
      if (n==5):
          five(d)
      if (n==6):
          six(d)
      if (n==7):
          seven(d)
      if (n==8):
          eight(d)
      if (n==9):
          nine(d)
      if (n==0):
          zero(d)
      pu()
      fd(1.5*d)
      pd()
  </code></pre>