def get_error(intercept, slope, points):
    """get_error function computes the error for a line passing through a
    given set of points (x, y)

    :intercept: y-intercept of the line passing through a set of points
    :slope: slope of the equation represented as m
    :points: set of (x, y) coordinates
    :returns: the error value computed

    """
    error_value = 0
    for i in range(0, len(points)):
        error_value += (points[i].y - (slope * points[i].x + intercept)) ** 2
    return error_value / float(len(points))