1 00:00:00,000 --> 00:00:01,500 (Janet - Zynga Engineer) Anyone can be a programmer. 2 00:00:01,500 --> 00:00:03,600 You just have to be a little bit adventurous, 3 00:00:03,600 --> 00:00:07,200 be willing to learn, and have a great idea. 4 00:00:07,200 --> 00:00:10,000 To explain functions and parameters, 5 00:00:10,000 --> 00:00:13,500 I can use the example of when you order food for lunch. 6 00:00:13,500 --> 00:00:16,000 So say you're ordering a sandwich and a drink. 7 00:00:16,000 --> 00:00:19,000 Well, the parameters would be 8 00:00:19,000 --> 00:00:23,000 what flavor of drink you want and what size sandwich do you want. 9 00:00:23,000 --> 00:00:25,000 And so in this way, 10 00:00:25,000 --> 00:00:28,320 functions in computers take parameters so that 11 00:00:28,320 --> 00:00:32,270 you can specify how big a shape is 12 00:00:32,270 --> 00:00:35,000 or what color the shape is. 13 00:00:35,000 --> 00:00:37,600 What if we want to draw a bunch of triangles and have 14 00:00:37,600 --> 00:00:39,230 their lengths be different sizes? 15 00:00:39,230 --> 00:00:43,000 Now you can use our function block and input different numbers 16 00:00:43,000 --> 00:00:45,000 so that we can draw different sized shapes. 17 00:00:45,000 --> 00:00:48,000 If you click the star on the draw triangle function, 18 00:00:48,000 --> 00:00:51,000 you can drag input name into input block; 19 00:00:51,000 --> 00:00:52,800 and then if you write 20 00:00:52,800 --> 00:00:56,129 length in the spot where it says X and press Enter. 21 00:00:56,129 --> 00:00:59,000 You'll create a length input for your function. 22 00:00:59,000 --> 00:01:02,000 Then click on the star again to close it out. 23 00:01:02,000 --> 00:01:06,000 Now, you'll want to click on the variables category 24 00:01:06,000 --> 00:01:10,260 and drag the length block into the move forward block of your function definition. 25 00:01:10,260 --> 00:01:14,750 Drag away the old number block and now you have a function block 26 00:01:14,750 --> 00:01:18,000 where you can input the length of the sides of your triangle. 27 00:01:18,000 --> 00:01:20,500 This is called a function with parameters. 28 00:01:20,500 --> 00:01:24,000 To use it, click on the functions category 29 00:01:24,000 --> 00:01:27,220 and drag out your draw triangle with length function. 30 00:01:27,220 --> 00:01:30,500 Now you can use the math block to input different numbers 31 00:01:30,500 --> 00:01:33,000 to draw triangles of different sizes. 32 00:01:33,000 --> 00:01:35,300 Give it a try in soon you'll be a coding ninja.