def fail_rate(num_fail, num_pass):
    """Computes fails rate, return N/A if total is 0."""
    total = num_fail + num_pass
    if total:
        return "{:.3f}".format(round(num_fail / total, 3))
    return "N/A"