Let's say we have two points, (x1, y1) and (x2, y2), on the line.
The gradient, also known as the slope, is calculated using the formula:
gradient = (y2 - y1) / (x2 - x1)
So, to determine the gradient, we need to find the difference in y-coordinates (y2 - y1)
Show more…