human
Find whether only two parallel lines contain all coordinates points or not | Find if slope is good with only two intercept.
if set of lines have only two distinct intercept.
Function to check if required solution exist.
check the result by processing the slope by starting three points.
Driver code"
Solution in Python:
 What is a code to find whether only two parallel lines contain all coordinates points or not and the other steps required?
assistant
#Here is code to find whether only two parallel lines contain all coordinates points or not and the other steps required.
 def isSlopeGood ( slope , arr , n ) :
	setOfLines = dict ( )
	for i in range ( n ) :
		setOfLines [ arr [ i ] - slope * ( i ) ] = 1
	return len ( setOfLines ) == 2
def checkForParallel ( arr , n ) :
	slope1 = isSlopeGood ( arr [ 1 ] - arr [ 0 ] , arr , n )
	slope2 = isSlopeGood ( arr [ 2 ] - arr [ 1 ] , arr , n )
	slope3 = isSlopeGood ( ( arr [ 2 ] - arr [ 0 ] ) // 2 , arr , n )
	return ( slope1 or slope2 or slope3 )
arr = [ 1 , 6 , 3 , 8 , 5 ]
n = len ( arr )
if checkForParallel ( arr , n ) :
	print ( 1 )
else :
	print ( 0 )