Learn English – Syntactically correct, semantically incorrect sentence

homeworksemanticssyntactic-analysis

How would I answer the following programming exercise? It's trying to emphasize the difference between semantics and syntax.

Write an English sentence that has correct syntax but has semantic errors.

Best Answer

The panda eats, shoots and leaves.

The syntax is correct: it relates an observation of a panda eating before shooting and leaving. However, the misplacement of the comma makes the sentence semantically incorrect, as the intention of the sentence should be that pandas eat shoots and leaves, not that this panda was shooting. (No offense to the Kung-Fu Panda, who may actually shoot.)