Answer
See below.
Work Step by Step
Let c be the positive number $c=|k|$.
Shifting to the left means that if $(a,y)$ was on the graph of f, we want the point $(a-c,y)$ to be on the new graph.
The new function is obtained from the old by defining it as $y=f(x+c).$
Shifting to the right means that if $(a,y)$ was on the graph of f, we want the point $(a+c,y)$ to be on the new graph.
The new function is obtained from the old by defining it as $y=f(x-c).$
Shifting up means that if $(a,y)$ was on the graph of f, we want the point $(a,y+c)$ to be on the new graph.
The new function is obtained from the old by defining it as $y=f(x)+c.$
Shifting down means that if $(a,y)$ was on the graph of f, we want the point $(a,y-c)$ to be on the new graph.
The new function is obtained from the old by defining it as $y=f(x)-c.$