Welcome back to Introduction to Python scripting. This is the first course in the Python scripting for DevOps specialization. All right, so in the second module of this course, we're going to look at how computers store data during the execution of a program. The way we specify this is what we call data types. By the end of this module, there's many things I'd like you to be able to do. That includes develop programs that utilize integers. Integers are numbers without a decimal value. When I say a decimal value, I mean a decimal point and a number after the decimal point. You should also be able to develop programs that utilize decimal numbers. These have a decimal point and a number to the right. This can include zero to the right of the decimal place. You should also be able to develop programs that utilize simple strings and we're going to build on our string operations later on. You should also be able to develop programs that utilize Boolean values. Boolean values take on the value of true or false. You should be able to develop programs that convert between any two data types. Lastly, you should be able to describe when a variable goes out of existence. All right, so in this first lesson we're going to think about the primitive data types that are built-in to the programming language. Simple built-in data types. We've got string, this is going to store text data. We've got integers, these are going to store whole numbers. We've got floats, which are going to be numbers with decimal places and we have Boolean, which is either true or false. Now, in a lot of programming languages, you have to declare your variable and initialize it. In Python, you do not declare variables. They are created on the first assignment, that's really important to understand. The concept still exists in Python, that exists in other programming languages, which is essentially you're declaring a variable when you assign it a value. Examples are name equals the "Aspen". Python's going to say, Aspen's a string. Name is a variable that's going to store a string. Age equals 53, 53 is an integer. Age is a variable, it's going to store an integer. Weight equals 160.50, that's a float. Weight is a variable, it's going to store a float. The same idea that if you've use another programming language before, that same idea of declaring variables exist, you just don't bother doing it in Python. You just need to make sure you assign a value to every variable before you try to use it in an expression. All right, now we move on to expressions, and I want to first think about arithmetic expressions. An expression essentially is built up using these operators. You should be familiar with all of them or most of them from your math background. But plus, minus, in multiplication, we use the asterisk, division we use the slash just like you used to. We've got some other ones. We have the modulus, which is the percent. You've all done modulus division, you just don't remember it. You probably did it in first and second grade where you said, 3 divided by 2 is 1 with a remainder of 1. The modulus is the remainder. Then the asterisk asterisk is how we say exponent, so x raised to the y power is x asterisk asterisk y. Then floor division essentially is the double slash, where we're going to take and cut out the remainder, so 3 divided by 2 with floor division is 1. All right, next we need to think about as we build up expressions, the order of evaluation. The thing that's done first is any exponents. Then any positive and negative signs, followed by multiplication and division, followed by integer division, followed by modulus. Lastly, we'll do addition and subtraction. Now you can override the order of evaluation just like you can in math with parenthesis. Here's some simple examples of arithmetic expression. I've got two columns here on the left-hand side, I've got some integer arithmetic. I got x equals 10, y equals 8, the result equals x plus y, which is 18. Decimal arithmetic looks the same way except for instead of having integers, we have decimal values, x equals 10.1, y equals 8.2, result is x plus y. We also have assignment operators, these assign values. Now, I'm not going to talk a lot about these yet, except for the top one. The top one in this table is the equal. We can say x equals 5 is the example. There's some other ones you'll see essentially we, in computer science we do something called accumulation, where we tend to accumulate a value in a variable, so we have shorthand notation. The next several plus equals, minus equals, asterisk equals, division equals, percent equals, slash slash equals, asterisk asterisk equals. Those all essentially are the same thing as saying whatever's on the left-hand side equals whatever is on the left-hand side operator, the right-hand side. For example, in row two of this table, you'll see plus equals is the same as saying x equals x plus 3, but we can write it x plus equals 3. That's a shorthand, don't worry about it. There's no extra value except for a little less typing by trying to do that. But what you need to realize is with assignment, we always evaluate the right-hand side first and then we assign it to the left-hand side. Focus on that first row, just the equals operator for now. But remember this exists and you come back later and think about these other types of assignment operators. All right, that's it for lesson one. Couple little highlights here. Integer data type stores whole numbers only. Integer division produces an integer type without a remainder. I called it floor division earlier, you can call it floor division or integer division, where essentially we're just cutting out the remainder. The first assignment to a variable saves a memory location that can then be referenced in code later on. That's important, you'll get an error if you try to reference a variable and you never assigned it a value earlier. All right, I'll see you in the next lesson.