I said what I said because of http://unix.stackexchange.com/help/how-to-ask. Several of the points on that page are relevant. Namely the *share your research* one though.
Yes, we do write lots of script for people here, but one thing I think you'll notice is that many of the scripts that are written are based on what the asker has already tried. We simply massage what they're doing into something that works.
While there is no official policy on homework questions, the community is pretty clear on their opinion of it: http://meta.unix.stackexchange.com/questions/344/homework-policy-proposal