You can answer any question you want in any way you want. We don't tell you what to answer and how to answer.
Consider, however, that the community has established what makes an acceptable question and will downvote and close (and eventually delete) and question that is not acceptable.
Questions that are not acceptable are indeed such questions that simply ask for code or for tutorials - in particular those that show no effort by the asker that they have made any sort of research or tried to figure out things by themselves.
As such, you need to ask yourself what value is there for the community, yourself and the asker in simply giving them what they want. In part, this would encourage them to continue with this unwanted behaviour and will not encourage them to go and find their own answers. In terms of the reputation to yourself - even if you gain some from an answer, if the question gets deleted, so will any answers and any reputation gained on such posts will be lost.
All this skirts any issues with the answer itself - it may be a good one and it may be a bad one (we consider answers that are simply links to be bad answers, so those would get downvoted).