Answer
a. see graph below
b. range =$(-\infty,0)\cup\{3\}$
Work Step by Step
A piecewise function has a different defining expression for different intervals.
Here, both definining expressions are linear.
So, for each interval, we need two points to draw a ray (half-line).
This is why we create two tables (as in the image)
one for $x\leq 0$, one for $x>0$
x=0 belongs to the interval$ x\leq 0, $so $f(0)=\displaystyle \frac{1}{2}(0)=0$
Solid circle at (0,0) - belongs to the graph
empty circle at (0,3) - does not belong to the graph
b.
Range of f
...to the left of x=0, f(x) is at most 0 ...
... to the right of x=0, f(x)=$3$
range = $(-\infty,0)\cup\{3\}$