When someone presents a "do my homework for me" question, particularly if they show no evidence of any effort on their part, please resist providing a direct answer. Instead, provide pointers, hints, and suggestions, and let them work to solve the problem themselves. Teach, don't solve.
Some people are capable of programming, but don't yet know it. They may flail for a bit. That's normal. By providing these people with complete answers, we're actually holding them back. We're robbing them of the wonderful "ahah!" moment that comes when you solve a problem yourself.
Some people, however, are not temperamentally suited for programming. If we provide answers for these people, they'll just keep coming back for more, and will waste a lot of everyone's time. By providing answers for these people, we're preventing them from being filtered out of the programmer pool early enough. Do you want a "do my homework for me" person as a teammate? So stick to providing hints. If they can't (or won't) rise to the occasion, let that be their problem, not ours.
For past meditations on the "homework" problem, see