Question: it's in python The purposes of this assignment include: passing of parameters and variations of import statement. You are to write a program to solve

it's in python  it's in python The purposes of this assignment include: passing of
parameters and variations of import statement. You are to write a program

The purposes of this assignment include: passing of parameters and variations of import statement. You are to write a program to solve quadratic equations in all their possibilities (real or complex roots, or even degenerate equations). Your program should prompt the user for the 3 coefficients a, b, and c, solve for x and print on stdout. If the solution is complex, the output should consist of a pair of expressions such as "2+31" and "2 - 31". Other cases will result in either two real numbers being printed, a single real number, or perhaps just a message. You must rename the square root function and use as sqroot You must use subprograms solve_linear, solve_quad, solve_real, and solve_complex wadratic Equation Activity Main Program prompt and read input for coefficient a prompt and read input for coefficient b prompt and read input for coefficiente if a is zero o if bis zero display error message (degenerate equation) o otherwise solve linear equation (call solve_linear and send b,c) o solve quadratic equation (call solve_quad and send a,b,c) otherwise solve linear calculate x=-c/b Hint: you may need to use a cast to handle integer division print . solve_quad if b?- 4ac

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!