# Connected, but it is not continuous at some point(s) of I

I have a mathematics problem, but I have no idea. please help me...

The problem is "Give an example of a function $f(x)$ defined on an interval I whose graph is connected, but is is not continuous at some point(s) of $I$"

In my idea, a solution is topologist's sin curve.

\begin{gather*} f\colon[0, 1] \to [0, 1] \\\\ f(x) = \begin{cases} \sin(1/x) &(x\neq 0)\\ 0 &(x=0). \end{cases} \end{gather*}

Is this function connected on $\mathbb{R}^2$ space but not continuous at $x=0$ ?

This is a good example. The graph of the topologist's sine curve, which includes the point $(0,0)$ as you have indicated, is indeed connected. However, it is not continuous. To see this, try and produce a sequence of points $x_n$ converging to $0$ for which $\sin(1/x_n) = 1$.
Yes, your function works perfectly. The graph of this curve is connected for the following reason: any open set that contains $(0,0)$ is going to contain another part of the curve.