I think you could get away with not even checking for parens, if you go with the idea that people doing it properly won't try to cheat it (because they'll learn nothing).
For people who do want to 'cheat', the grade is meaningless anyway.
I thought about that, but my reasoning for checking parens is that there's a decent subset of people who might get stuck and just google an answer, but if it gets rejected, then they'll put more time into figuring out the correct answer.
I guess I'm trying to view it from the POV of a beginner, as most CS people/programmers can work through this without needing the website.
For people who do want to 'cheat', the grade is meaningless anyway.