To run the program press the green flag. Then, type into the box at the bottom of the screen a 14 digit code that works like this: There are five '1' s and nine '0' s that you must fill in the code with in any order with no spaces and then press the tick. The '1' s are the fig balls that move to the right and the '0' s are the chocolate or coconut balls that move to the left. In the top right of the screen is a counter which counts how many collisions there were.
This scratch program was made by me (Zino) for the Southampton Senior Maths Challenge Question 9. The code with the most collisions is 11111000000000 with 45 collisions. You can press the see inside button to see how I programmed this.