def slope(p1, p2):
    """Estimate the slope between 2 points.

    :param p1: (tuple) first point as (x1, y1)
    :param p2: (tuple) second point as (x2, y2)
    :returns: float value

    """
    # test types
    try:
        x1 = float(p1[0])
        y1 = float(p1[1])
        x2 = float(p2[0])
        y2 = float(p2[1])
    except:
        raise

    # test values (p1 and p2 must be different)
    if x1 == x2 and y1 == y2:
        raise Exception

    x_diff = x2 - x1
    y_diff = y2 - y1

    return y_diff / x_diff