def percent_calc(totalX, totalY):
    """
    Takes 2 integers, uses totalX to get 1% and totalY to get final percentage
    Returns the final percentage as an int or 0 if not divisible e.g. if X is 0
    """
    try:
        percent = int((100 / totalX) * totalY)
    except ZeroDivisionError:
        percent = 0
    return percent