Question: 3. Extra credit: Write a Python program that solves any quadratic equation that has two roots. For this one, since we need to bracket the

 3. Extra credit: Write a Python program that solves any quadratic

3. Extra credit: Write a Python program that solves any quadratic equation that has two roots. For this one, since we need to bracket the root to start the search, we ask the user to type in a, b, and c and an initial value for x where y is positive and an another where y is negative (if they aren't, complain to the user and stop). Then we search for the root using bisection search between those two user-input guesses for x. Print out the number of iterations needed. (30 points of extra credit. Any attempt will be worth some points.) Turn this in as p3_bisection.py. solving ax^2 + bx + c = 0: a = 1 b = -1.5 C = -1 low bracket = -100 high bracket = 0 one root is: -0.50000 took 41 iterations

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!