Answer:
I can't see the line but if you start at a point where the line crosses over an intersecting corner and find the next nearest corner where it intersects the slope will be however many up(or down - if its down its negative) you have to go/ how many sideways you have to go
ex:
so in example A the slope would be 2/1 which simplifies to 2 and in example B the slope would be -3/2