This is a very simple example of recursion (a block calling itself). Scratch 2 gives the ability to create custom blocks (very much like methods in other programming languages). Custom blocks have the ability to execute themselves (recursion). This is a very simple example with no bells and whistles of drawing lots of clever graphics. It keeps the scripting to a minimum so you can easily understand the concept of recursion, which can be a little confusing at first. The cat will ask you which times table you would like it to say, and using recursion, it will say the times table for you. This could have been implemented using a simple loop, but was an ideal scenario for demonstrating recursion.
All coding by Phil Curnow. Web: http://www.curnow.biz Twitter: @pcurnow