title: X and Y Intercepts From Slopes - Python
body: <p>I have been working on a slope calculator that also finds x and y intercepts... how do I do this in Python? Thanks!
  Here is my current code:</p>
  
  <pre><code>def getSlope(x1, y1, x2, y2):
      slope = (y2-y1)/(x2-x1)
      return slope
  
  def getYInt(x1, y1, x2, y2):
      s = getSlope(x1, y1, x2, y2)
      x = 0
      y = s*0 + yi
  </code></pre>