To run the program press the green flag. Then, in the top right side of the program you will see 'newy' and 'newg'. These tell you how many yellow candies there are and how many green candies there are (randomly generated). In the top left corner it says 'PREDICTION'. This is what the program thinks will be the last colour. In the top right is also a list called 'End Colour' which shows the results of the 50 tests of this starting position that just happened. The y axis is the amount of green candies and the x axis is the amount of yellow candies. The change in brightness shows time gone by.
This scratch program was made by me (Zino) for the Southampton Senior Maths Challenge Question 3. You can press the see inside button to see how I programmed this.