I want to show the following:
$X$ $n$-connected $\iff $ any continuous map $f:K \rightarrow X$ where $K$ is a cell complex of dimension $\leq n$ is homotopic to a constant map
For this I think I can use the following: $X$ $n$-connected $\iff $ every continuous map $f: S^n \rightarrow X$ is homotopic to a constant map.
Proof:
"$\Leftarrow$"
If any continuous map $f:K \rightarrow X$ where $K$ is a cell complex of dimension $\leq n$ is homotopic to a constant map then any $f: S^n \rightarrow X$ is homotopic to a constant map. So $X$ is $n$-connected.
"$\Rightarrow$"
I'm not sure how to proceed in this direction. I know $X$ is $n$-connected and so $\pi_i (X) = 0$ for all $i \leq n$. I also know any $f: S^i \rightarrow X$ is null-homotopic.
How to proceed from here? Many thanks for your help!