your lack of any historical knowledge is incredible.
India followed 3 paths that converged in their getting their independence in 1947
Unlike the Brits in the 1700s, the Brits post WWII realized that they were going to be leaving and decided to leave their colonies while keeping a friendly relation -- this was far better for the Brits than what the French did with their colonies
The fact that there wasn't a pitched battle for independence does not mean that the Indians didn't fight for theirs in their own way
The Brits lost WW 2 to America.