Stack Overflow is the site for professional and enthusiast programmers. If your question is about a programming problem you're facing, then you are in the right place. If it's not a real, practical problem you're facing, then you start to cross over into the grey areas and risk your question being closed.
The best Stack Overflow questions aren't academic, like you're example. Instead, the best questions stem from real world problems. Ideally, you would have tried to solve the problem yourself, and you would demonstrate these attempts by documenting your research and what you've tried in the question body. This would not only give others a place to start in helping you solve your problem, but it would also prevent others from giving you answers that you've already tried. Nothing will make an answerer want to downvote a question more than posting an answer and having the asker exclaim "no i try that alredy it diddnt work!!!!". What a waste of time for both the asker as well as the answerer!
Even on Programmers SE, such a question is off-topic. In fact, most Stack Exchange sites discourage purely academic or basic questions.
Now, that's not to say we don't want people to come here who are amateurs. You can still be new to something and still make an attempt yourself, document your research, and show what you've tried. But being new doesn't give you a free permission slip to get others to do your work for you without you making an attempt. That's not to say that was your intention, but I hope it's clear what types of questions we're looking for and how you can edit your questions for best results. Hope this helps!