Computing $[\mathbb{R}P^2, S^k]$ I am trying to compute $[\mathbb{R}P^2,S^k]$ for $k\geq 0$, via the cofiber sequence associated to $f:S^1\to S^1$ given by $z\mapsto z^2$, where we get the mapping cone $C_f \cong \mathbb{R}P^2$. The cases $k=0$ and $k\geq 3$ and be handled by hand and so can $k=1$, but I am having trouble with the $k=2$ case. 
The relevant fragment of the cofiber sequence is $[S^2, S^2] \to [S^2, S^2] \to [\mathbb{R} P^2, S^2] \to [S^1,S^2]$ which upon identification of the relevant homotopy groups gives $\mathbb{Z} \stackrel{\cdot -2}{\to}\mathbb{Z} \stackrel{\pi^*}{\to} [\mathbb{R} P^2, S^2] \to 0$ and one would like to say something like $[\mathbb{R} P^2, S^2] \cong \operatorname{coker}(\mathbb{Z} \stackrel{\cdot -2}{\to}\mathbb{Z})$ but the left hand side is not a group, so taking quotients does not necessarily make sense. 
From exactness, we do get that $[\mathbb{R} P^2, S^2]=\operatorname{im}(\pi^*)$ where $\pi: \mathbb{R} P^2\to S^2$ collapses the $1$-skeleton, which then leads us to having to look at $f\circ \pi: S^2\to S^2$ which factor through $\mathbb{R}P^2$ and those have degree $0$ only. So what is the correct way of seeing what $[\mathbb{R} P^2, S^2]$ is? 
Thanks!
 A: It can be seen that for $n+1$ dimensional CW complexes, $S^n$ represents n dimensional cohomology. This is because a model of $K(G,n)$ exists with $n+1$ skeleton $S^n$. Hence, your set is $H^2(\mathbb{R}P^2)=\mathbb{Z}/2$. 
Note that basepoints don't matter since $S^2$ is simply connected.
A: By exactness you already know that all the even maps are sent to the constant map. To prove your claim, all that remains is to check that all odd maps are sent to the same map (specifically, $\pi \in [\mathbb RP^2, S^2]$). The way I'll write my proof won't be formal as there will be drawings, but hopefully it is clear that there is a way to make it formal.
The idea for that is that a map $S^2\to S^2$ of odd degree is expressible as a "geometric construction" from a map of even degree and the identity $S^2\to S^2$: the addition on $\pi_2(S^2)$ corresponds to an honest geometric thing with the pinch map $\mathrm{pinch}: S^2\to S^2\lor S^2$; and one can try to simulate that on $\mathbb RP^2$ (which looks a lot like a hemisphere of $S^2$)
So let $f : S^2\to S^2$ have odd degree. Then up to homotopy, $f= (g \lor id_{S^2})\circ \mathrm{pinch}$ where $g : S^2\to S^2$ is some even degree map and $g\lor id_{S^2} : S^2\lor S^2\to S^2$. 
Now represent $\mathbb R P^2$ as a southern hemisphere of $S^2$ with the boundary glued along the thing you know; on my drawings it will be represented as just a hemisphere (because of course I can't draw the gluing) : 

Then we can also pinch on the lower part of said hemisphere (so far away from the weird gluing) and get $\mathbb RP^2\lor S^2$ : 

Then if you do $\pi$ on the top $\mathbb RP^2$ or on the one wedged onto $S^2$, it commutes to get a $S^2\lor S^2$ (that's where the drawing is a bit unfaithful : you have to pinch at the right point), in other words the following diagram commutes (up to homotopy or strictly if one chooses the red circle correctly) : 

Now you note that $f\circ \pi = (g\lor id_{S^2})\circ \mathrm{pinch}\circ \pi$ (with $g$ as above) and $\mathrm{pinch}\circ \pi$ is the "down-right" section of this diagram. Therefore if I let $h$ denote the upper horizontal map of this diagram, we get $f\circ \pi = (g\lor id_{S^2}) \circ (\pi\lor id_{S^2}) \circ h$ because the diagram commutes and $(\pi\lor id_{S^2}) \circ h$ is the "right-down" section of the diagram. 
Thus $f\circ \pi = ((g\circ \pi)\lor id_{S^2})\circ h $ and as $g$ has even degree we see that $g\circ \pi \sim \mathrm{cst}$ a constant map. Now you can either see for yourself that this exacltly implies $f\circ \pi \sim \pi$, or do the following reasoning :
$\mathrm{cst} = \mathrm{cst}\circ \pi$ so the previous thing implies $f\circ \pi \sim ((\mathrm{cst}\circ \pi )\lor (id_{S^2}\circ id_{S^2})) \circ h = (\mathrm{cst}\lor id_{S^2}) \circ (\pi\lor id_{S^2})\circ h = (\mathrm{cst}\lor id_{S^2}) \circ \mathrm{pinch}\circ \pi$ and $ (\mathrm{cst}\lor id_{S^2}) \circ \mathrm{pinch}$ is a representative for  $0 + id_{S^2}=id_{S^2}$ in $\pi_2(S^2)$, so that $f \circ \pi \sim id_{S^2}\circ \pi = \pi$.
So $f$ is sent to $\pi$ : all odd degree maps are sent to $\pi$, all even degree ones to the constant map, so $[\mathbb RP^2, S^2 ] = \mathbb{Z/2Z}$
Note : I have been terrible with notations, in that I used $\lor$ on maps to denote two things : one of them is "if $f:X\to Y, g:Z\to W$, then we get $f\lor g : X\lor Z\to Y\lor W$"; and the other one is "if $f:X\to Y$ and $g:Z\to Y$ then we get $f\lor g : X\lor Z\to Y$". Hopefully from the context it is clear which one I meant every time. 
If you need clarifications about the drawings (or anything else), don't hesitate to ask !
