In Rikki-tikki-tavi, the cobras and rikki-tikki-tavi are very different, but in some ways the same. The cobras are mean, and powerful, but don't really have courage like Rikki-tikki-tavi. Rikki-Tikki-tavi and the cobras both show loyalty to those they love.

oh and i am supposed to compare and contrast

I think you are on the target exactly.

Yes, you have identified some similarities and differences between Rikki-tikki-tavi and the cobras in the story. Let's break it down and further explore the points you mentioned.

1. Mean and Powerful:
The cobras are portrayed as dangerous and menacing creatures in the story. They have venomous bites and are not afraid to attack. On the other hand, Rikki-tikki-tavi is a mongoose, who is also powerful, but not inherently mean. He uses his strength and agility to protect himself and his loved ones.

2. Courage:
While the cobras possess power, they lack the courage that Rikki-tikki-tavi exhibits. Rikki-tikki-tavi fearlessly confronts the cobras and exhibits bravery when defending the garden and its inhabitants, despite their overwhelming size and strength. He doesn't hesitate to take on dangerous situations, showing his courage in the face of danger.

3. Loyalty:
Both Rikki-tikki-tavi and the cobras demonstrate loyalty, although in different ways. Rikki-tikki-tavi shows his loyalty towards the humans who adopt him, namely Teddy and his family. He risks his life to protect them from the cobras and other threats. The cobras, on the other hand, show loyalty to each other within their own snake community, working together to achieve their malicious goals.

To compare and contrast these characters, you can focus on their differing intentions, motives, and how they respond to various situations. Also, highlighting their similarities in terms of loyalty and the perception of power can provide a well-rounded analysis.