 Hello, everyone. In this video, we will work on the interactive window that is available in Python win. And we will focus a little bit our attention on variables and different types of variables and how we can use them. So I'll just move. Before we begin, I would like to talk a bit about the importance of commanding your code. Whenever someone else looks at your code, or even if you yourself comes back to something that you have written a while ago, you will need the comments in order to be able to understand better and faster what its little part of your script does. So in order to create comments, the bound or most commonly known nowadays, the hashtag symbol is used. A comment can be given on its own line preceding a large piece of code such as a function where it describes more or less what it does. And the way to do it is the following. This is a comment. If I hit return, enter. Nothing happens because this is a comment. It's not a part of an executable code. Also, keep in mind that the comment can follow a specific line of code if you want to place an important message at a particular part of our script to keep in mind what happens at a very specific part of our script. So let's say s equals one. And this is very important. However, we cannot use the pound symbol like this the following way that I'm going to do it. Let's say that we have a string equals to this. This is not a comment. Because if I come here and hit string, we will see that the pound symbol is part of the string that I have created. But we will talk more about strings in a following video. After this brief introduction about comments, we can move on to the use of numbers and variables in the interactive window. The simplest thing that we can do over here is to use Python as a calculator. Here's an example. We can say two plus two equals four. Or we can use the interactive window to have some more complex mathematical formulas such as this one divided let's say by four and get a result right away. Keep in mind that this was a perfect division. And take notice that in the following division that I'm going to do only the integer part of the result is going to be shown in a similar manner to a Neuclidean division. So if we say seven divided by three, we will get only two. And if we want it in this particular case to get the remainder of this division, we would have to use the following operator. Seven like that. And we will get the remainder of one. Now let's spend some time to talk very briefly about variables. You could think variables as a small memory boxes where we can store different values that are useful to our programs. In order to do that, we use the equal sign in order to assign a value that we want into a variable. So let's say that we have a variable called width. And that is equals to 20. And then height equals to five times nine for whatever reason. And then we can use these variables to have some mathematical formulas such as width times height. And this should produce 900. Yes. So keep in mind that the same value can be assigned to different values to different variables throughout our program. And actually we can do that very easily in just one assignment like sorry, this one where x equals y equals z equals two zero. So indeed x is zero, y is zero, z is zero. And also be careful that if you try to use a variable that you have not yet defined, meaning you have not yet assigned any value to that variable, you will get an error such as let's say what are the contents of the variable and there is no n defined yet. So in order to do that, we have to first assign a value to n. So let's talk a little bit about the different types of variables that we're going to have specifically about number types of variables that we're going to use. So if we define x equals to five and then we ask Python what is the type of the x variable, we're going to get an answer that it is indeed an integer. And keep in mind that when we're using another variable to create a new one, the new variable is assigned the same type. What I mean is that if we use x to define y in a way such this one times three, y in this case is 30 and the type of y would be integer as well. If we want to, yeah, another thing, if we use a float number in this example, and let's say that y in this case is 5.0 instead of the same number but in this case it is a float number plus x times three. And we check to see what is the type of y, we will get a float number because in this case, Python is going to go and assign the more general, more encompassing type of variable since that one was used during the definition of that variable. And if we go to the previous example with a division where we had the seven divided by three getting a two, if we use a float seven and divide that by three, the result is not going to be an integer anymore. It's going to be a float number so we're going to get a more accurate result of 2.3333. Another way to receive similar results in this division or in similar cases, we can use a technique that is called typecasting. By doing that, you don't have to create different types of variables that have different types. I'm sorry, you can do the following. So let's say that x equals seven and y equals three, both of them are integers. But if we want to get a float result of this division, let's say z equals the float version of x divided by y and we get the 2.3333. One last thing I would like to bring up about the interactive mode before we move on to script windows is that the last printed expression is always assigned to a variable name underscore. This means that when you're using Python as a desk calculator, it is easier to keep that in mind and it's going to save you some time. So let's say in a very brief example, we have a ducks variable equals to something like that. It's 12.5%. The price of an item equals 185. Price times ducks equals that. So price plus underscore would be the final amount of money that we would have to pay. But be careful, these variables should be treated as a read only by the user. Don't try to assign a specific value to that variable because it's going to create a mess. Because this is going to create an independent local variable with the same name. And yeah, it's going to be problematic. So treat it as a read only and use it for only this specific purpose.