code: def numToDigits(num, places):
      
      s = str(num)
      if len(s) < places:
          return ("0" * (places - len(s))) + s
      elif len(s) > places:
          return s[len(s)-places: ]
      else:
          return s
docs: Helper, for converting numbers to textual digits.