def mx_c(x1,y1,x2,y2):
	"""Returns gradient and y-intercept for straight line segment between the points (X1,Y1) and (X2,Y2)
	"""
	# gradient
	m = (y2-y1)/(x2-x1)
	# y-intercept
	c = y1-m*x1
	return m,c