let x1 = 0, y1 = 0 in (0,0) and let x2 = 8 and y2 = 8 in (8,8). To find the gradient, we would do (y2 - y1)/(x2-x1) = 1. To find the length, we would do the square root of the following: (y2-y1)^2 + (y2-y1)^2 which gives us the square root of 128 and this simplifies to 8sqrt(2). For the midpoint, we would do ((x1+x2)/2,(y1+y2)/2) which gives (4,4).The reason why I have opted to use x1, x2, y1 and y2 is to generalise it for any numbers we are given.