Question: Write a Python function solvequadratic(a, b, c) that returns the solution(s) of the quadratic equation a*x**2 + b*x + c = 0. Use the discriminant
Write a Python function solvequadratic(a, b, c) that returns the solution(s) of the quadratic equation a*x**2 + b*x + c = 0.
Use the discriminant d = b**2-4*a*c to determine whether there are 0, 1, or 2 real roots. Use the Python has a built-in complex() function to return the complex roots.
The program must prompt user inputs a,b,c and print the roots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
