from math import * for p in range(4,15): h=10.0**(-p) approx=(exp(1+h)-exp(1))/h print p, approx, abs((approx-exp(1))/exp(1))