algorithms/convex_hull.py
def random_points(n: int, x, y):
    """
    Returns the coordinates of a set of random points. No doublon is allowed.
    :type n: int
    :param n: number of points
    :param x: x range
    :param y: y range
    :return: a tuple of list
    """
    X = []
    Y = []
    generated_points = []
    i = 0

    while i < n:
        u = randint(-x, x)
        v = randint(-y, y)

        # If new point doesn't exist already
        if generated_points.count([u, v]) == 0:
            generated_points.append([u, v])
            X.append(u)
            Y.append(v)
            i += 1

    return X, Y

    Returns the coordinates of a set of random points. No doublon is allowed.
    :type n: int
    :param n: number of points
    :param x: x range
    :param y: y range
    :return: a tuple of list
    
Returns the coordinates of a set of random points. No doublon is allowed.
Returns the coordinates of a set of random points . No doublon is allowed .
def random_points(n: int, x, y):
    X = []
    Y = []
    generated_points = []
    i = 0
    while i < n:
        u = randint(-x, x)
        v = randint(-y, y)
        if generated_points.count([u, v]) == 0:
            generated_points.append([u, v])
            X.append(u)
            Y.append(v)
            i += 1
    return X, Y
def random_points ( n : int , x , y ) : X = [ ] Y = [ ] generated_points = [ ] i = 0 while i < n : u = randint ( - x , x ) v = randint ( - y , y ) if generated_points . count ( [ u , v ] ) == 0 : generated_points . append ( [ u , v ] ) X . append ( u ) Y . append ( v ) i += 1 return X , Y
Returns the coordinates of a set of random points.
Returns the coordinates of a set of random points .
"""
    Returns the coordinates of a set of random points. No doublon is allowed.
    :type n: int
    :param n: number of points
    :param x: x range
    :param y: y range
    :return: a tuple of list
    """ # If new point doesn't exist already
a tuple of list
a tuple of list
n
int
number of points
number of points
x
None
y
None