Watch the balls bounce on each other. To change the number of balls or their size, change the sliders and click the flag again. It follows the law of conservation of momentum, and the conservation of energy. This time, the balls are different masses. To see the current momentum and energy, press space.
After some algebra, I managed to combine the laws of conservation of momentum and energy. I added that to my previous project ( https://scratch.mit.edu/projects/660894881/ ) so now it accurately simulates balls of different masses. Also see version 3! https://scratch.mit.edu/projects/662160288/