This is my first question so I hope I do it right. I got this question about a subset. Given that
Let $f$ be function from an open set $X\subseteq \mathbb{R}^{k}$ to $\mathbb{R}$ that are continuous on $X$.
Let $d \in \mathbb{R}$. Define $Z\left(d,f\right)\equiv\left\{ x\ |\ f\left(x\right)\leq d\right\}$. Prove that $Z(f,d)$ is a closed set.
I tried to think about $z^{c}$ and maybe proof that this set is open, but I got stuck on the way. Maybe there some kind of connection between closed set and continuity that I don't understand.
Hint: a function is continuous iff the preimage of any closed set is closed.
Apply this for $Z(d,f)=f^{-1}((-\infty,d])$.