SHARE
TWEET

Untitled

a guest Jun 19th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top