In general we want questions to be about a practical problem the OP faces. One could argue that "I don't know how to write this code" is a very practical problem, but that is not exactly what is meant. Ideally we would like to see something along the lines of:
- This is the task I'm working on
- This is how far I've gotten
- This is where I'm stuck
The "where I'm stuck" part is where the problem lies and where we would step in to help you (if at all possible). Usually we request some form of code for the "how far I've gotten" part. But in some instances a clear explanation of the problem and some form of proof of self-study is acceptable as well.
The scenario you outline seems to suggests that the OP only addresses the first point above and skips anything else, showing no attempt to solve anything, nor showing any interest in trying to solve it. Essentially he's not asking us to help him solve his own problem, but he's asking to solve his problem for him. Which would cover (I assume) the "no intent to learn" part you're referring to.
In such a case, I would consider this to be "Not a real question". Just because something can be phrased with a question mark, doesn't mean it's a real question as we usually define it. The "How to Ask" page clearly states to do your homework. If you have not done so, or do not show us that you've done so, you're not asking a real question.
I would most likely vote to close accordingly.