Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
you should also note that since it's an inelastic collision (the kinetic energy is not conserved), the total energy is always conserved, so the kinetic energy "lost" in the collision has to convert into some other form: heat, sound, etc.