Welcome to the second lesson on programming within Python. We're going to do a quick recap of some of the math operators, or the arithmetic operators that you can actually use within the language. Some of them might be very familiar, some of them might be less familiar, but certainly it's a good reminder of some of the things out there, specifically for understanding the syntax. Let's go through them. We do have simple expression math expressions like addition and subtraction, multiplication and division. All of those have specific tokens associated with them, which are pretty much standard. But we also have calculations like the remainder, the floor division, or the exponent. Sometimes those might not be as familiar and we will see a bit of an example of how those actually work within the language, and it's always a good information to have of some of the operators that you can actually use within the language. Let's go through them in the code. Here we go. Let's just create an environment in which we can actually work. I'm going to create a simple variable of assumation 2-3. At all times as we just covered, you can do a print function to test how this variable is in fact executed, and if you're having any errors you wouldn't see the result. So far so good. Feel free to add more comments than the ones I'm doing here. Let's just do a simple addition, subtraction. Let's call that subs equals 3-2. Notice that if I do no space, that shouldn't be a problem. Some people like writing really tight code, and some people like spreading the code a little bit more for legibility. Certainly that's something that it's up to you. I actually do prefer having a little bit more space, so readability, the way in which you can relate to your own work in programming, is something that I certainly always encourage students too. Make your editor your own find the right color combination contrast and also the font size so that you feel at home with your own work. The multiplication, and very straightforward. Let's do 2*3. We have six here. Notice that for whatever reason I would just capitalize this, like thinking that, maybe I forgot that this variable was actually spelled with a lower case m, and I pressed capital case. We're not going to get the result. In other programming environments, you're going to get much more clear error message saying that this is actually missing. But because this is mostly a programming environment for graphic content and it's not really meant to be Python environment originally, we're not getting that message, but something that we'll have to work with, it's a trade off between graphic capabilities of what we're doing here versus the kind of information that we get in terms of making errors. I like testing as I go, that the information I'm creating is in fact correct, through a print method or something along those lines. We'll see other forms of debugging in the future. Let's do a few more division. Let's see what happens here if I do a 3/2. Notice that I'm writing the three and two as integers, meaning that they don't have any decimal place. But the division of this operation should be a float. Let's see the result of this. We actually get one and that's pro incorrect. If we divide 3/2, we should get a 1.5. The way we determine these variables, and I'm going to add a 0.0 to each one of those. Even just doing it to one of them should be enough. But this actually signals the program that we would like to consider these variables as floats, so that the operation of division doesn't end up removing the 0.5 that it's actually required for the calculation to be correct. That's a little bit of a consideration as we're doing some of these operations, how careful we are in getting the correct information. This might be a rounding error that might be at the center of a much larger calculation, and if for whatever reason you forgot to add this decimal place, it might be that you're not getting the right accurate result that you're expecting. Let's look at the remainder operation. Here we're going to spell remainder. The remainder operation is done with the modular or the percentage sign. This is an operation that is not that common, but it's very useful. It's very useful if you want to find odd and even numbers and things like that. Basically what the remainder operation is doing is calculating if the two fits one in three, what is the remainder? What is the accident, if you want, of that division? In this case that would be one. Let's execute that to double check. We have that. If we would put a four here, you would see that the result of that operation should be zero, because the two feet actually twice in four. Let's just close these windows. Whenever you're running out of space, you can always create more space for you to work here. Let's jump into the final one or no, just we have a few more but we're going to cover the floor division. Let's just write it and understand. It's a floor division, and we're going to call it a flow for now, and that's five with this double backslash sign. Let's see the calculation. In this case the floor division, it's going to give us that division operation which in this case is two, but it's going to remove any remainder. It's going to give us the lowest denominator. If we have 5.5 for instance, you'll see that it will give us to us as a float, but in fact, it will still give us the floor, meaning the lowest value rounded down from that operation. That's something also quite useful to have. Then finally, the exponent, which we're going to cover here, it's exp = 2**3. Obviously, if you imagine we don't have a way of writing that three in a very small format adjacent to the two, so this is the way you would spell out this exponent. You see that if I type exp turns pink, that means that there seems to be a keyword associated with that variable. I'm going to call it expo, short for exponent, and I can double check that, that's in fact working. We have a value of eight, that means let's just do a comment. If you remember, an exponent means that we have 2*2*2 , that's three times. If we actually would have it one more time, an exponent of four, two exponent of four, we would get a result of 16 as you can see here. These are the arithmetic operators. There's a few caveats regarding how you deal with variable types in the case of division, for instance, and how there's a conversion made once you use a decimal place, and what is the precision that you're expecting and how certain other operators in fact help us obtain the result that is exactly what we wanted in case we wanted the lower the floor operator for instance. I hope this is useful. I'll see you in the next lesson where we'll continue with functions.