Sub-Program

A small set of instructions for completing one small task. Subprograms can be combined in a main program to accomplish a large task using small steps.

In the above example, the student has coded a sequence which will determine the area and volume from a predetermined rectangle. We can see that the example uses repeat blocks, wait blocks, as well as variables which are part of control structures. We can also see that the student has included sub programs to determine area, volume, as well as movement for the sprite. The video below demonstrates the code in action. This example corresponds with Mathematics E2.6, E2.7, C3.1, C3.2.

Volume and Area.m4v

Try it now!

To practice with sub-programs, access our Scratch Playground here ⤵️