Quadratic Polynomial solver using Python