Even weighted codewords and puncturing My question is below:

Prove that if a binary $(n,M,d)$-code exists for which $d$ is even, then a binary $(n,M,d)$-code exists for which each codeword has even weight.

(Hint: Do some puncturing and extending.)

Breaking this down to individual steps. Assume that $d=2t$ is an even integer.
Assume that an $(n,M,d)$ code $C$ exists.


*

*Show that puncturing the last bit from the words of $C$, you get a code $C'$ with parameters $(n-1,M,d')$, where $d'\ge d-1$. Actually we could puncture any bit, but let's be specific. Also we fully expect to have $d'=d-1$, but can't tell for sure, and don't care.

*Let us append each word of $C'$ by adding an extra bit chosen in such a way that the weight of the word is even. Call the resulting code $C^+$. Show that $C^*$ has parameters $(n,M,d^*)$, where $d^*\ge d'\ge 2t-1.$ Observe that all the words of $C^*$ have an even weight.

*Show that the minimum distance of $C^*$ must be an even number. Conclude that $d^*\ge d$.


Observe that we did not assume linearity at any step.
