To determine the value of $k$ for which the given function $f(x)$ is continuous at $x = 0$, we need to ensure that the left-hand limit, the right-hand limit, and the value of the function at this point are all equal. Let's analyze the problem step-by-step:
Hence, the correct answer is 3.