Menu

(Solved) : Input Endpoints B Tolerance Tol Maximum Number Iterations Output Approximate Solution P M Q44105736 . . .

Translate this Pseudo code into a program using python.

INPUT endpoints a, b; tolerance TOL; maximum number of iterations No. OUTPUT approximate solution p or message of failure. St

INPUT endpoints a, b; tolerance TOL; maximum number of iterations No. OUTPUT approximate solution p or message of failure. Step 1 Set i = 1; FA = f(a). Step 2 While i < No do Steps 3–6. Step 3 Set p= a + (b – a)/2; (Compute Pi.) FP= f(p). Step 4 If FP = 0 or (b-a)/2 < TOL then OUTPUT (p); (Procedure completed successfully.) STOP. Step 5 Set i =i+1. Step 6 If FAFP >0 then set a = p; (Compute ai, bi.) FA= FP else set b=p. (FA is unchanged.) Step 7 OUTPUT (‘Method failed after N, iterations, No =’, N.); (The procedure was unsuccessful.) STOP. Show transcribed image text INPUT endpoints a, b; tolerance TOL; maximum number of iterations No. OUTPUT approximate solution p or message of failure. Step 1 Set i = 1; FA = f(a). Step 2 While i

Expert Answer


Answer to INPUT endpoints a, b; tolerance TOL; maximum number of iterations No. OUTPUT approximate solution p or message of failur…

OR