Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_slope(x1, y1, x2, y2):
- if (x1) == (x2): return "inf"
- else: return ((float)(y2-y1)/(x2-x1))
- x1 = 1
- y1 = 2
- x2 = -7
- y2 = -2
- print(find_slope(x1, y1, x2, y2))
- 0.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement