Here are different opinions about what made India a democracy. How much importance would you give to each of these factors?
(a) Democracy in India is a gift of the British rulers. We received training to work with representative legislative institutions under the British rule.
(b) Freedom struggle challenged the colonial exploitation and denial of different freedoms to Indians. Free India could not be anything but democratic.
(c) We were lucky to have leaders who had democratic convictions. The denial of democracy in several other newly independent countries shows the important role of these leaders.
(a) Before the arrival of Britishers, India predominantly had a monarchial way of administration. The arrival of the Britishers and centuries of oppression in their hands led to the generation of solidarity and increased the Indian understanding of the concept of Democracy. Therefore no, democracy is not a gift to India from the British rulers; it is a hard-earned laurel earned by the sweat and blood of numerous nationalist Indians. At the same time, it also needs to be acknowledged that it was the British rule that gave Indians the first taste of how legislative should work, so yes there is a contribution technically.
(b) The freedom struggle and the choice of democracy are two nearly exclusive topics. There are several examples in the world history like Pakistan, where the country even after earning freedom with difficulty eventually turned into non-democratic. It was the efforts and insight of the leaders of the time of independence that Democracy was chosen as the best legislative model.
(c) The leaders at the time of the Indian Independence were surely insightful and virtuous to ensure that Democracy is adopted. This insight was because they had the firsthand experience of the oppression under the British rule. They made sure that their descendant nationals do not face the same fate as them, thus they protected India from slipping into a frame that was undemocratic. So yes, we were lucky in that matter.