def prettyPercent(numerator, denominator, format='%5.2f'):
    """output a percent value or "na" if not defined"""
    try:
        x = format % (100.0 * numerator / denominator)
    except (ValueError, ZeroDivisionError):
        x = 'na'
    return x
