def calculate_faceoff_percentage(all_faceoffs, faceoffs_won):
    """
    Calulates percentage of specified number of won faceoffs among given number
    of all faceoffs.
    """
    if all_faceoffs:
        faceoff_pctg = round(faceoffs_won / all_faceoffs * 100., 3)
    else:
        faceoff_pctg = 0

    return faceoff_pctg