All you need to understand is how to use them and what they will do. User-defined subroutines can also be used as black boxes, provided that someone else has written them for you. This program contains the definitions of six subroutines for drawing symmetric pictures. These subroutines are meant to be used in the same way as the usual drawing subroutines such as forward and circle . This subroutine is similar to the built-in forward command, except that instead of just drawing one line, it draws eight lines in a symmetrical pattern.
Nothing appears on the screen, since all the program does is define some subroutines.
However, once the subroutines are defined, you can use them as commands, just as you would use any of xTurtle's built-in commands. Also try some other commands. In the previous part of the lab, you used several subroutines as black boxes, without having to understand what went on inside the box. When you write a subroutine yourself , you are working inside the box. While you are writing the subroutine, you can concentrate on making it perform the specific task it is designed to do, without worrying for the moment exactly what role it will play in a complete program.