Sentence (i): "Everybody in the class is prepared for the exam."
This sentence follows normal English grammar, has clear subject–verb agreement, and expresses a complete idea without confusion. Therefore, it is grammatically correct and unambiguous.
Sentence (ii): "Babu invited Danish to his home because he enjoys playing chess."
This sentence contains a pronoun ambiguity. The word "he" can refer either to Babu or Danish. Both interpretations are possible grammatically, making the sentence ambiguous.
Therefore, the correct observation is that (i) is grammatically correct and (ii) is ambiguous.