Edits should ideally fix everything that's wrong with the post, or at least take a major step towards this goal. It's only worth editing a closed question if your edit gives it a chance at being reopened. I don't mean that you should only edit sure-fire reopen candidates, but stick to editing questions for which the cleaned-up version looks reasonably good, or for which the edit makes a dramatic difference (e.g. translating a post in a foreign language). Editing a post that's on its way to deletion anyway is a waste of time. I would have rejected both your examples as “too minor”, because the questions are unsalvageable.
Regarding homework specifically, please do remove the tag on questions that shouldn't be closed (and fix everything else that needs fixing — formatting, tags, grammar, etc.), and do not remove the tag on questions that should be closed and deleted (but do cast a flag to close). Users with sufficient privilege look for questions with the tag to close or delete; removing the tag removes these questions from the cleanup radar.