Consider, the function $f:\mathbb Q\to \mathbb R$ defined by
$$f(x)=\begin{cases}1 &\text{ if, } x<\pi\\2 &\text{ if, } x>\pi\end{cases}$$
Show that, $f$ is continuous but NOT uniformly continuous..
Let, $\epsilon >0$ be arbitrary. Then, we can always find a $x>\pi$ and a $y<\pi$ such that $|x-y|<\delta$.
But, $|f(x)-f(y)|=|2-1|=1\not <\epsilon$.
So , $f$ is NOT uniformly continuous..
But I am unable to find that $f$ is continuous....
Let $\varepsilon > 0,x \in \mathbb{Q}$ and define $\delta=|\pi-x|$. For $x<\pi$, if $|x-y|<\delta$ then $y<\pi$ so $|f(x)-f(y)|=|1-1|=0<\varepsilon$. Essentially the same thing happens when $x>\pi$. Note that the $\delta$ I chose here depends on $x$, and goes to zero when $x$ gets closer to $\pi$.
Also your proof that you don't have uniform continuity is not quite right. You should fix a $\varepsilon$, which should be less than $1$, say $\varepsilon=1/2$. Then let $\delta > 0$ be arbitrary and choose an $x$ so that the interval $(x-\delta,x+\delta)$ contains a point on the other side of $\pi$.
Still, +1 for showing your work.