 Let's think about a box and how we deal with it in math class. A box has a length, width, and height. And we have formulas for the box's volume, surface area, and diagonal, shown as a dotted red line in the diagram. We're going to write a Python class that lets us create box objects. The length, width, and height will be the object's state, and will use more meaningful names than L, W, and H. The formulas for volume, surface area, and diagonal will become the methods. We start with the keyword class and the name of our class, box. By convention, class names always begin with an uppercase letter. Let's put in a document comment, represent a box, by its length, width, and height. Now we write a very special method called the initializer, also called the constructor. It has this name underscore underscore init underscore underscore, and it has one parameter, which, by convention, is always called self. You can think of self as meaning the object we're working with. The method's body initializes the state. It doesn't return a value. We'll set the length of the object we're constructing to one, and the object's width to one, and the same for its height. We can now create a box object. We'll have a variable called box one. And to create the object, we give the name of the class and then parentheses. When you use the name of the class as though it were a function, that will call the initializer method and the object that gets constructed will be assigned to the variable on the left side of the assignment statement. Let's print that variable and see what it says. This tells us we have a box object and where the reference is in memory. But that's not very enlightening. We'll improve this in a later video. Although printing the object all by itself doesn't do much for us, we can get to the state variables just fine. I can print the length, box one dot length, the width, and the height. And they all show up as one. If we want to change the dimensions of the box, we can change the state variables. We can say box one's length becomes 2.5, box one's width becomes 4, and box one's height becomes 7.82. Let's copy and paste our print statement there and we can see that the dimensions have changed. That works, but it isn't very satisfying. We'd like to have a way to set the state variables at the time we create the object. Let's change the initializer method to accept three more parameters. An initial length, an initial width, and an initial height. And we'll use those parameters to assign the state variables. The initial length is assigned to the length of the object we're constructing. The initial width is assigned to the width of the object we're constructing. And the initial height is assigned to the height of the object we're constructing. And now, when I create my box object, I'll put in the initial length, width, and height that I want the box to have. I won't need this code anymore, and I'll have a box with the dimensions I wanted. Now that we have the object's state, we need to implement its methods, and that's the subject of our next video.