Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. def find_slope(x1, y1, x2, y2):
  2. if (x1) == (x2): return "inf"
  3. else: return ((float)(y2-y1)/(x2-x1))
  4.  
  5. x1 = 1
  6. y1 = 2
  7. x2 = -7
  8. y2 = -2
  9.  
  10.  
  11. print(find_slope(x1, y1, x2, y2))
  12. 0.5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement