Answer
See explanations.
Work Step by Step
Assume function $f(x)$ has the same maximum and minimum value of $K$ in the interval of $[a,b]$. We can conclude that at any point $x\in [a,b]$, $f(x)=K$. This is because if $f(x)\ne K$, we have two cases. In the first case, $f(x)=L\lt K$. Then, $L$ will be a new minimum which contradicts the given condition. In the second case, $f(x)=M\gt K$. Then, $M$ will be a new maximum which also contradicts the given condition. Thus the function has a constant value of $K$ in the interval of $[a,b]$.