Enter function,  set initial approx and tolerance

f[x_] = (E^x) - 4.  + (x^2); p0 = 0; p1 = 1; q0 = f[p0];  q1 = f[p1]; 
    TOL =  .00001;

Main algorithm (Secant)

Print[
        p = p1 - ((q1 (p1 - p0))/(q1 - q0))];
While[Abs[p - p1] > TOL,  
p0 = p1; 
        q0 = q1; 
p1 = p; 
        q1 = f[p]; 
Print[
          p = p1 - ((q1 (p1 - p0))/(q1 - q0))]];