code: def _p100(part, total, prec=1):
      '''Return percentage as string.
      '''
      r = float(total)
      if r:
          r = part * 100.0 / r
          return '%.*f%%' % (prec, r)
      return 'n/af _p100(part, total, prec=1):
      '''Return percentage as string.
      '''
      r = float(total)
      if r:
          r = part * 100.0 / r
          return '%.*f%%' % (prec, r)
      return 'n/a'
docs: Return percentage as string.