This script takes two points and compute the slope between two points
# slope((x1,y1),(x2,y2)) def slope(x1,y1,x2,y2): deltay = y2-y1 deltax = x2-x1 if deltay == 0 and deltax == 0: return "Need two points" if deltax == 0: return "undef" if deltay == 0: return 0 else: m = deltay/deltax return m