1 00:00:00,000 --> 00:00:00,580 2 00:00:00,580 --> 00:00:02,810 >> DAVID MALAN: So this program's in pretty good shape, but wouldn't it 3 00:00:02,810 --> 00:00:05,970 have been nice if there were a cough puzzle piece that we could have used 4 00:00:05,970 --> 00:00:07,210 right out of the box? 5 00:00:07,210 --> 00:00:09,710 Well, we can actually create that the piece ourselves. 6 00:00:09,710 --> 00:00:13,950 Let's go to the More Blocks palette, click Make A Block, give this new 7 00:00:13,950 --> 00:00:16,560 block a name of Cough, and click OK. 8 00:00:16,560 --> 00:00:19,580 And notice that Scratch has now provided us with the starting point 9 00:00:19,580 --> 00:00:22,470 via which we can make our own new puzzle piece. 10 00:00:22,470 --> 00:00:24,610 >> Now, what does it mean to define a cough? 11 00:00:24,610 --> 00:00:28,250 Well, let's go ahead and steal some of the pieces we used earlier, dragging 12 00:00:28,250 --> 00:00:31,380 and dropping them down to this new-defined Cough block. 13 00:00:31,380 --> 00:00:35,030 And now let's go up to the top left here, where we see a new puzzle piece 14 00:00:35,030 --> 00:00:39,490 that Scratch has called what I asked, Cough, drag it inside of that loop, 15 00:00:39,490 --> 00:00:41,810 and now click the green flag. 16 00:00:41,810 --> 00:00:45,910 Cough, cough, cough. 17 00:00:45,910 --> 00:00:50,010 >> Exactly as before, but now look how much more readable my program is. 18 00:00:50,010 --> 00:00:53,820 When the green flag is clicked, repeat the following three times-- 19 00:00:53,820 --> 00:00:54,610 cough. 20 00:00:54,610 --> 00:00:55,860 And that's it. 21 00:00:55,860 --> 00:00:56,620