In this lesson you will learn about variables and constants. So a variable in Python is a name of a container or a name of a location in the computer's memory where data can be stored. And as you might have guessed, the data that is stored can change. So that is why it's called a variable. Now, each variable has a name and there are some basic rules when it comes to creating variable names. First, a variable name must start with a letter or the underscore character, so we can't start a variable with a number. Also, a variable name can only contain alpha numeric characters and the underscore character. For example, we cannot have an exclamation mark as part of the variable's name. Also, Python variables are case sensitive, so the variable name age with all small letters is not the same variable name as age with a capital A or age in all capital letters. In general, Python is a case sensitive language. So this rule also applies to function names, reserved words and basically any word you type in Python. So please be aware of that distinction. Now, in Python, variable names don't have to be declared with a specific type, because the type of the variable is determined dynamically based on the value that is assigned to it that the value of variables can change, and that's why we call them variables. But we can also change the variable data type. So I can have a variable name called age with a value of 25, which would make this variable an integer. But if I change the value of the variable age to the spelled out words 25, then this same age variable that was an integer type has now become changed to a string type due to its new value. So again, please be aware of that concept. The variable's data type is based on the value. We give it to that variable, which can change. It's important to follow some basic naming conventions. There are a few ones out there, and here are the three of the most common ones. The Camel case Naming Convention makes all the letters in a variable's name lowercase if it's one word variable. Another naming convention is the Pascal case. The first letter of each word starts with a capital case. And the last naming convention here is the Snake case. This convention makes all the letters lowercase, but if we have multiple words, we don't squish them together, but we separate them with an underscore, which is the only allowed nonalphanumeric character when creating a variable's name. And this Snake case is the default naming convention when writing Python code. Now, the opposite of variables are constants. So variables can change, but constants do not. And that's why they are called constants. For example, if you have a variable that you know its value is never going to change, then it makes sense to call it a constant. It's still treated the same way by python in that it gets stored in a memory address. But to distinguish a variable from a constant in our code, we use all capital letters. Now along the lines of constants and things that do not change. There are some special keywords in the Python programming language that are reserved meaning. These special words cannot be used as variables or constants names because they have a special use and meaning in the Python programming language. And as you can see from this list, words like and, or try, while, if, and so much more. These are reserved words that we cannot use as variable names because they mean something in Python. So I can't create a variable name called finally or Global or return. All right, so now that we got the theoretical part out of the way, let's work some examples. I'll go to my jupyter notebook, which I have already opened. I'll create a variable called my first name. Okay? And notice I am using the Snake case because all letters are in lowercase and the words are separated by underscores. So that is the name of my variable, which is the Identifier in my computer's memory, address or location. But I still need to assign it a value. So I will type equal to Jack, and I will surround Jack with double quotes, and I will explain the double quotes in the next lesson when we talk about data types. So now I have a variable name called my first name, and I set its value to Jack. And to confirm that this is true, I will print out this variable like this. And now when I run this code, I get the output as Jack. So anytime I call the name of this variable, it returns its value that is currently stored. Now, I told you earlier that the variable's value can change. So if I go back to my code and add another code line that says my first name is equal to John, and now I run my code, the output now is John, not Jack, because I changed the variable's value in the second line. I also explained that variable names must start with either a letter or an underscore. So I tried to create a variable and call it first name, using the number one as a first character and set its value to Mary. Then when I try to run it, I get a syntax error. This means that I typed something that the Python interpreter does not understand, and so it flagged it as an error. I also explained that Python is case sensitive. So if I create a variable called age with all lowercase and assigned it a value of 25, then if I printed out the value of age but use a capital A for age, I get an error that age with a capital A does not exist, which is correct. The variable called age is with a lowercase A, and Python is case sensitive. So if I now fix this issue and change this code to use Age with a lowercase A and run it again, then the code is happy and runs without any errors. And if I try to create a variable using any of the Python reserved words, I will also get an error. For example, I'll attempt to use the reserved if word as a variable name and see what happens. I'll type if equals 25, then run my code and now I get an error. How about I change the word if with try, then run my code and I still get an error? Because these are reserved words that have a special use in Python and cannot be used as variable names. So in this lesson, you learned about variables and constants. Please stay tuned for the next lesson where we will learn about data types. Thanks for watching.