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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!