def _percent(x, total, default=0.0):
 if total:
  return ((100.0 * x) / total)
 else:
  return default

def _percent ( x , total , default = 0.0 ) : if total : return ( ( 100.0 * x ) / total ) else : return default
return what percentage *x* is of *total* .