The question and its answer is given below:
Determine whether t the function $f(x) = e^x \cos (1/x)$ is uniformly continuous on $A = (0,1)$.
but I am wondering why the $n$ is chosen like this, and if it should be $N$? and why $1/n\pi$ is $\leq \delta?$ could anyone explain this for me please?

There is a mistake in the proof. If you take $n=[\frac 1 {\delta \pi}]+1$ the proof works fine because $n >\frac 1 {\delta \pi}$ in this case , so $\frac 1 {n\pi} <\delta$.