How rigorous does this need to be? For instance, are you suppose to use the epsilon-delta definitions? It is very easy to apply in this case:
For all $\displaystyle \epsilon >0$, choose $\displaystyle \delta = \frac{1}{2}$ so that $\displaystyle 0<|x-3|<\frac{1}{2} \implies x\not \in \mathbb{Z} \implies f(x)=2 \implies |f(x)-2|=0 < \epsilon$. So the limit is $\displaystyle 2$.
You can easily generalise this to arbitrary $\displaystyle a\in \mathbb{Z}$ instead of $\displaystyle 3$. And by generalise I mean replace every instance of $\displaystyle 3$ with $\displaystyle a$ and you'll get a valid proof.
The limit for b) is also two. You need minor modification to the proof above. For example, take $\displaystyle \delta $ to be the distance for $\displaystyle \pi$ (or $\displaystyle a\not \in \mathbb{Z}$) to the nearest integer.
In light of parts a) and b), it should be obvious if and where the function is continuous.
For x any number "close" to 3, but not equal to 3, x is NOT an integer so f(x)= 2. Therefore $\displaystyle \lim_{x\to 3}f(x)= ?$
For x any number "close" to $\displaystyle \pi$, but not equal to $\displaystyle \pi$, x is NOT an integer so f(x)= 2. Therefore $\displaystyle \lim_{x\to 3}f(x)= ?$