That's only an issue for users with rep < 3,000. I can see that your rep is currently some 1,000 and that's probably why you're asking yourself about this. I had this very same doubt until I got beyond the 3,000 rep mark.
That's what I did then and what I do now:
When I had rep < 3,000 I just downvoted the question and hoped that a higher rep user saw that as a signal and closed the question himself. There are a lot of users with rep > 3,000 in EE.SE, and they pull they trigger fairly quick when a bad homework question comes in. Sometimes I also flagged it as "unclear what you're asking".
Now that I have rep > 3,000 I can add off-topic reasons (which also automatically adds a comment to the question, very convenient), an option unavailable if you're below that mark. See the screenshot below. That's what I use for this kind of questions when I'm the first user voting to close. Other users prefer to vote to close as "unclear what you're asking", and sometimes I use that option if the question already has 3-4 closing votes, just to avoid messing up too much.
However, all of these are just guidelines, personal preferences or unwritten rules at best. I would also like to see a dedicated "homework attempt with no solution attempt" off-topic flag. It would be a convenient feature for users under 3,000 rep, and would also send a clearer message to users incurring in this kind of off-topic.