[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:01.40,0:00:04.30,Default,,0000,0000,0000,,(Brina Lee - Instagram Engineer)\NA function is pretty much a sequence of instructions Dialogue: 0,0:00:04.35,0:00:06.10,Default,,0000,0000,0000,,to perform a specific task. Dialogue: 0,0:00:06.10,0:00:08.11,Default,,0000,0000,0000,,Basically if you're building a car, Dialogue: 0,0:00:08.11,0:00:11.20,Default,,0000,0000,0000,,what you want the car to do is what a function is. Dialogue: 0,0:00:11.20,0:00:12.80,Default,,0000,0000,0000,,Turn right, you want to turn left, Dialogue: 0,0:00:12.80,0:00:15.20,Default,,0000,0000,0000,,you want it to drive, you want it to stop. Dialogue: 0,0:00:15.20,0:00:17.10,Default,,0000,0000,0000,,All those could be functions. Dialogue: 0,0:00:17.10,0:00:18.30,Default,,0000,0000,0000,,Now that we're back with our farmer, Dialogue: 0,0:00:18.30,0:00:20.80,Default,,0000,0000,0000,,we're going to start learning how to define functions. Dialogue: 0,0:00:20.80,0:00:22.20,Default,,0000,0000,0000,,You'll notice in your workspace Dialogue: 0,0:00:22.20,0:00:24.70,Default,,0000,0000,0000,,that there's a block that has a star in the corner. Dialogue: 0,0:00:24.78,0:00:26.80,Default,,0000,0000,0000,,This is a function definition. Dialogue: 0,0:00:26.80,0:00:30.00,Default,,0000,0000,0000,,At the top line of the block it tells us the name of the function. Dialogue: 0,0:00:30.00,0:00:32.70,Default,,0000,0000,0000,,The blocks inside of it tell us what it does. Dialogue: 0,0:00:32.70,0:00:34.80,Default,,0000,0000,0000,,This definition sits in the workspace, Dialogue: 0,0:00:34.80,0:00:36.68,Default,,0000,0000,0000,,but our farmer won't do the actions Dialogue: 0,0:00:36.68,0:00:40.00,Default,,0000,0000,0000,,inside the function, until we drag out the function block. Dialogue: 0,0:00:40.00,0:00:43.50,Default,,0000,0000,0000,,To do that, we need to click on the functions category in the menu Dialogue: 0,0:00:43.50,0:00:46.00,Default,,0000,0000,0000,,and drag out the "fill 5" function. Dialogue: 0,0:00:46.00,0:00:49.00,Default,,0000,0000,0000,,Let's put the fun back into functions!