Hi, in this video we're going to learn more about functions in Karel. So, what is a function? A function is a way to teach Karel a new word. So why should we use functions? Well, functions allow us to break down our program into smaller parts and make the program easier to understand. Using functions is a key element in having good programming style. So functions, what do they look like? Well, you have the function key word, then you have the name of your function, open paren, closed paren, and then inside the curly braces is your code, the instructions for that function. But you would never call it something like "myFunction." You would call it something where the name describes what the function does. Here function buildPyramid. You can figure out from that name that this function will build a pyramid. You have to give your functions good names. So there's two aspects to dealing with functions that we need to learn about. One is defining a function, and one is calling a function. So what is defining a function? That means you are specifying the instructions for this new action. Calling a function is actually causing that action to happen. So let's take a look at a specific example. But first, let's look at the rules for defining a function. So the name should start with a letter and cannot have any spaces. The name should describe what that function does, and then the code in that function goes between the open and closed curly braces. And that's the function body. So if we're going to define turnAround, we write: function, turnAround, open parens, closed parens, open curly brace, and then the instructions that tell Karel how to turn around. So turnLeft, turnLeft, then closed curly brace. And if we want to call turnAround, if we want to make Karel actually turn around in our program, we write, turnAround, open paren, closed paren, semicolon. So let's go into our code editor and make this happen. So the program that I want to write here is a program where Karel moves forward one step, and then turns around. So I'll say: move, and then turnAround. Well, if I run this, the turnAround function doesn't exist yet, but we can define it. We can teach Karel how to turn around. So we say: function, turnAround, and then to turn around we give the instructions. So we say turnLeft, and then turnLeft. So let's run that. So there you go. Now, Karel moves and then turns around. You can slow it down and see that turning around is actually just turning left two times. But now we've given it a better name. It's clearer what our program does.