1 00:00:04,059 --> 00:00:10,840 One of the great things in computer programming is once you've taught a computer how to do 2 00:00:10,840 --> 00:00:22,390 an action, you can call that function again. You give it a name and then you can call it. 3 00:00:22,390 --> 00:00:28,960 That's really like extending the language. In the program we built, we learned how to 4 00:00:28,960 --> 00:00:39,250 draw a square by moving and turning four times. We can take that function and give it a name, 5 00:00:39,250 --> 00:00:46,430 draw a square so that any time we want to do that, we simply say draw a square and it 6 00:00:46,430 --> 00:00:53,990 will go back and invoke that function, that code and it will get done for us. We've added 7 00:00:53,990 --> 00:01:00,580 that concept to our programming language. In this puzzle, we have already created a 8 00:01:00,580 --> 00:01:06,210 draw a square function for you. You'll see it in the toolbox as a green block. What you'll 9 00:01:06,210 --> 00:01:10,299 need to do is write the same code you wrote before to draw a square and put it in this 10 00:01:10,299 --> 00:01:16,820 function. To do that, click on the edit option in the green draw a square block. This will 11 00:01:16,820 --> 00:01:21,499 open up the function editor. The function editor has three parts. A place where you 12 00:01:21,499 --> 00:01:26,950 name your function. This will appear on the green block before that function. Then write 13 00:01:26,950 --> 00:01:31,960 out a short description of what your function is supposed to do. In this case, it's supposed 14 00:01:31,960 --> 00:01:37,229 to draw a square. The white space below this is the work space and works just like the 15 00:01:37,229 --> 00:01:42,149 work space you've already been using. Drag and drop blocks from the toolbox into this 16 00:01:42,149 --> 00:01:46,810 work space. Remember to put the blocks that create a square inside the green wrapping 17 00:01:46,810 --> 00:01:52,159 block for the function. Once you're done, click on save and exit. This will take you 18 00:01:52,159 --> 00:01:57,209 back to the main puzzle work space. Now you can use the draw the square function block 19 00:01:57,209 --> 00:01:59,459 just like any other block to solve the puzzle.