Artificial intelligent assistant

Does a continuous function from $[a,b]$ to $[c,d)$ exist? Let $f$ be a continuous function on $[a,b]$ and its image is a semi-open interval $[c,d)$ (both of them are in $\Bbb R$) If this function exist, give an example, or prove it doesn't exist. At first I tried to found an example but everything lead me to a contradiction and I've tried to prove it doesn't exist but I'm going round in circles. Any advice will be helpful. Thanks.

Let's say such function does exist. Since it's image is $[c,d)$, we know $f$ reaches values arbitrarily close to $d$ on the interval $[a,b]$ but never actually reaches $d$. So, let's make a sequence of values of $f$ that get closer and closer to $d$.

Let's define $x_n$ as a sequence of numbers in $[a,b]$, such that $$|f(x_n)-d| < \tfrac1{2^n}$$

Does this seem familiar? If you know about limits, this is pretty much the definition of a limit. So, we see

$$\lim f(x_n) = d = f(\lim x_n)$$ But, since all $x_n\in[a,b]$, we know $\lim x_n\in[a,b]$. So, let $X = \lim x_n$, and we see $f(X) = d$. This is a contradiction, because we assumed $f$ didn't reach $d$ on $[a,b]$.

We conclude, such function does not exist.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f545600dace5a4da72b3f460ce51f99f