Question: PROBLEM 3: Write a script called solve quadratic-equation.py that computes solutions for an arbitrary quadratic equation ar? +ba+c=0 ,where r is the variable that you
PROBLEM 3: Write a script called solve quadratic-equation.py that computes solutions for an arbitrary quadratic equation ar? +ba+c=0 ,where r is the variable that you need to solve for and the coefficients a, b, and c are the real numbers that the user need to input. In Problem 1, we saw a case that only work for real solutions. Your script should work for any real number value of the coefficients a, b, and c and output the messages . "Equation has two real solutions . "Equation has two complex solutions . "Equation has a single solution" . "Equation has no solution" The program should also output the solutions if they exist. Some useful information are listed below: . When a = 0, the program should still it work and generate the correct outputs depending on the values of b and c When b2 - 4ac > 0 and a + 0, there are two distinct real solutions - b 62 - 4ac 11.12 2a When b2 - 4ac = 0 and a 70, there is a single real solution When b2 - 4ac
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
