Yes, it's perfectly OK to ask:
What have you tried?
or:
Please show your code.
or even:
Please explain what you mean by "not working".
However, you should always be polite - remember the rule "be nice". We're trying to "make the Internet a better place" here.
If you need to add any (or all) of these comments that's the mark of a bad question. Leaving these comments is the first step on getting a good question that people can answer.
If there's no effort to improve the post then it's the mark of a question that can be closed.