I agree with David Zaslavsky, but with a few caveats.
In the case of sara's questions, they're both pretty textbook questions in a linear programming class, and to answer those questions, you're generally only required to state something like, "I would solve the following LP," and give a formulation. So Dirk's answer for the positivity constraints question would essentially be the entire answer for the homework.
(I am still kicking myself that I didn't think of what he did; again, well done, Dirk!) Similarly, the approximate solution question is pretty straightforward; I even have a deleted answer that solves the problem, but I'm not going to post it for a little while.
Some scientific computing problems don't require code; they only require a short description of how you would go about solving the problem, and for those types of homework assignments, I'm reticent about just posting a solution. I like the policies of Math.SE and Physics.SE; perhaps these FAQs could also be used to inspire guidelines.