# Find 5 iterations of the bisection method with I0=[1,4] to # approximate the solution to f(x)=0 where f(x)=log(x)-x+2. println("This is Problem 1 for Exam 2.") xn=[2.5, 3.25, 2.875, 3.0625, 3.15625] # Define any additional function you need here a=1.0 b=4.0 correct=0 println() for i=1:5 global x,a,b,correct x=(a+b)/2 println("I_$i = [$a,$b], x_$i = $x") # Please add lines to this loop and fix it # so it performs the needed bisection step if abs(x-xn[i])<1e-7 correct+=1 end end println() if correct!=5 println("Please try again. Your answer is incorrect.") else println("Congratulations! Your answer is correct!") end