[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:04.06,0:00:10.84,Default,,0000,0000,0000,,One of the great things in computer programming\Nis once you've taught a computer how to do Dialogue: 0,0:00:10.84,0:00:22.39,Default,,0000,0000,0000,,an action, you can call that function again.\NYou give it a name and then you can call it. Dialogue: 0,0:00:22.39,0:00:28.96,Default,,0000,0000,0000,,That's really like extending the language.\NIn the program we built, we learned how to Dialogue: 0,0:00:28.96,0:00:39.25,Default,,0000,0000,0000,,draw a square by moving and turning four times.\NWe can take that function and give it a name, Dialogue: 0,0:00:39.25,0:00:46.43,Default,,0000,0000,0000,,draw a square so that any time we want to\Ndo that, we simply say draw a square and it Dialogue: 0,0:00:46.43,0:00:53.99,Default,,0000,0000,0000,,will go back and invoke that function, that\Ncode and it will get done for us. We've added Dialogue: 0,0:00:53.99,0:01:00.58,Default,,0000,0000,0000,,that concept to our programming language.\NIn this puzzle, we have already created a Dialogue: 0,0:01:00.58,0:01:06.21,Default,,0000,0000,0000,,draw a square function for you. You'll see\Nit in the toolbox as a green block. What you'll Dialogue: 0,0:01:06.21,0:01:10.30,Default,,0000,0000,0000,,need to do is write the same code you wrote\Nbefore to draw a square and put it in this Dialogue: 0,0:01:10.30,0:01:16.82,Default,,0000,0000,0000,,function. To do that, click on the edit option\Nin the green draw a square block. This will Dialogue: 0,0:01:16.82,0:01:21.50,Default,,0000,0000,0000,,open up the function editor. The function\Neditor has three parts. A place where you Dialogue: 0,0:01:21.50,0:01:26.95,Default,,0000,0000,0000,,name your function. This will appear on the\Ngreen block before that function. Then write Dialogue: 0,0:01:26.95,0:01:31.96,Default,,0000,0000,0000,,out a short description of what your function\Nis supposed to do. In this case, it's supposed Dialogue: 0,0:01:31.96,0:01:37.23,Default,,0000,0000,0000,,to draw a square. The white space below this\Nis the work space and works just like the Dialogue: 0,0:01:37.23,0:01:42.15,Default,,0000,0000,0000,,work space you've already been using. Drag\Nand drop blocks from the toolbox into this Dialogue: 0,0:01:42.15,0:01:46.81,Default,,0000,0000,0000,,work space. Remember to put the blocks that\Ncreate a square inside the green wrapping Dialogue: 0,0:01:46.81,0:01:52.16,Default,,0000,0000,0000,,block for the function. Once you're done,\Nclick on save and exit. This will take you Dialogue: 0,0:01:52.16,0:01:57.21,Default,,0000,0000,0000,,back to the main puzzle work space. Now you\Ncan use the draw the square function block Dialogue: 0,0:01:57.21,0:01:59.46,Default,,0000,0000,0000,,just like any other block to solve the puzzle.