Originally Posted by jwenting
Consider that your teacher might deliberately give you code which requires some thinking on your part to get it working.
That's what I'd do were I teaching class. Not always, but some of the time. I'd probably tell you though that there's something wrong so you'd not be as confused.
Good way to get kids to think rather than copy answers verbatim from a source book, though it doesn't seem to work anymore with kids refusing to think and rather post their entire assignment on some website where they'll then shout foul when noone gives them a complete perfect solution in 10 seconds...