human
Minimum lines to cover all points | Utility method to get gcd of a and b.
method returns reduced form of dy / dx as a pair.
get sign of result.
method returns minimum number of lines to cover all points where all lines goes through ( xO , yO ).
set to store slope as a pair.
loop over all points once.
get x and y co - ordinate of current point.
if this slope is not there in set , increase ans by 1 and insert in set.
Driver code"
Solution in Python:

Give me a code to minimum lines to cover all points and the other steps required?
assistant
#Here is code to minimum lines to cover all points and the other steps required.
 def gcd ( a , b ) :
	if ( b == 0 ) :
		return a
	return gcd ( b , a % b )
def getReducedForm ( dy , dx ) :
	g = gcd ( abs ( dy ) , abs ( dx ) )
	sign = ( dy < 0 ) ^ ( dx < 0 )
	if ( sign ) :
		return ( - abs ( dy ) // g , abs ( dx ) // g )
	else :
		return ( abs ( dy ) // g , abs ( dx ) // g )
def minLinesToCoverPoints ( points , N , xO , yO ) :
	st = dict ( )
	minLines = 0
	for i in range ( N ) :
		curX = points [ i ] [ 0 ]
		curY = points [ i ] [ 1 ]
		temp = getReducedForm ( curY - yO , curX - xO )
		if ( temp not in st ) :
			st [ temp ] = 1
			minLines += 1
	return minLines
xO = 1
yO = 0
points = [ [ - 1 , 3 ] , [ 4 , 3 ] , [ 2 , 1 ] , [ - 1 , - 2 ] , [ 3 , - 3 ] ]
N = len ( points )
print ( minLinesToCoverPoints ( points , N , xO , yO ) )