title: Python quadratic formula not working
body: <p>I am trying to create a simple program to sole for the roots of a quadratic equation in python, but my code is not working. Here is what I have so far:</p>
  
  <pre><code>from math import *
  def qf(a, b, c):
      print((-b+sqrt(b*b-4*a*c))/(2*a));
      print((-b-sqrt(b*b-4*a*c))/(2*a));
  while(True):
      qf(input("A: "), input("B: "), input("C: "))
  </code></pre>
  
  <p>And here are the errors I get when evaluating:</p>
  
  <pre><code>Traceback (most recent call last):
    File "qf.py", line 6, in &lt;module&gt;
      qf(input("A: "), input("B: "), input("C: "))
    File "qf.py", line 3, in qf
      print((-b+sqrt(b*b-4*a*c))/(2*a));
  ValueError: math domain error
  </code></pre>
  
  <p>What errors have I made, and how can I fix them?</p>