Question: In Python 3 7. Quadratic Formula A quadratic equation is a second order polynomial with three coefficients a, b, and c. It is given by:
In Python 3


7. Quadratic Formula A quadratic equation is a second order polynomial with three coefficients a, b, and c. It is given by: ax2 +bx+c-0 The solutions to the equation are given by the formulas - 4ac 2a and 4ac 2a Write a function that computes the roots of a quadratic equation and returns them as a tuple (xi,x2). Your function should take three parameters, a, b, and c. If only one soluction exists, return (x1.None). If not solution exists or all coefficients are equal zero return (None,None). Note that if b2-4ac0 then the roots will be complex. Hint: remember that Python has a built-in complex data type
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
