I think those sorts of questions are okay with some minor editing.
My personal preference is to see the assignment clearly called out and then the correct answer noted. I think it's courteous to the community to indicate that it's homework so that the scope of the question is a bit better defined. That allows the community to switch into a "theoretical only" type mode and remove considerations that might be applied in a real world scenario.
Those two questions meet our guidelines regarding homework problems in that they show the related equations and the OP has attempted to solve the problem.
I didn't close this question as a duplicate of the earlier homework question because I think you're asking about a nuance that hasn't been addressed yet.
These questions begin with a homework-like question, show some work, and end with phrases like 'Am I missing anything?' or 'What am I doing wrong?'.
emphasis added
I didn't particularly like the end phrasing on those questions as there's an obvious answer of "Yes, you're missing something because you didn't get the right answer." And as much as I find pedantry amusing, I think the community can be more constructive than that.
I think that the right approach is to edit that portion of the question and help focus things on what the actual problem appears to be.
Taking a broader perspective, it's fair to think about what percentage of the site we want homework questions to represent.
I'll admit my bias towards conceptual problems appearing to be more interesting. And my own preference would be to have homework questions be in the minority. My Programmers and StackOverflow profiles reinforce that bias.
But I would be foolish to not acknowledge the successes that StackOverflow has had. And that success is due in part to handling very focused homework questions like the ones we're currently allowing.
So while I may not want homework questions to represent the majority of the site, they certainly don't hurt at lower volumes and I think we're still on the right side of that balancing point.