Answer
See below:
Work Step by Step
(b)
The given function is:
$f\left( x \right)=\left\{ \begin{align}
& 2x\text{ if }x\le 0 \\
& \text{2 if }x>0
\end{align} \right.$
This function constitutes of 2 straight lines, one of them being parallel to the x-axis.
As can be seen from the graph, the range of the function is $\left( -\infty ,0 \right]\cup \left\{ 2 \right\}$.