def compute_figure_score(target, result):
    """ Compute the score corresponding to the found result, knowing that
    target was supposed to be found
    """
    if target == result:
        return 10
    elif abs(target - result) == 1:
        return 8
    elif abs(target - result) == 2:
        return 7
    elif abs(target - result) == 3:
        return 6
    elif abs(target - result) == 4:
        return 5
    elif 5 <= abs(target - result) <= 6:
        return 4
    elif 7 <= abs(target - result) <= 8:
        return 3
    elif 9 <= abs(target - result) <= 10:
        return 2
    elif abs(target - result) <= 100:
        return 1
    else:
        return 0