 All right, well, hello, everyone. We are live now. Welcome to the introduction to Python. This is part of a Sailor Live series, where we're going to be discussing the units of our course, Introduction to Python. You can find that course on sailor.org. If you're not enrolled in the course now, you can go over. It's free. It's self-paced. You can find that course right now. Come back to this later after you've completed Unit 1. And listen, you can leave a comment down there. And we'll try and get back to you. But today, we're going to be discussing Unit 1. And without further ado, I'm just going to introduce to you our teacher for the course, professor for the teacher. Let's go, teacher, professor. Dr. Eric Sack, thank you very much for doing this. OK, fantastic. Can everybody hear me at this point? You can be heard. Great, fantastic. Yeah, so yeah, I'm Dr. Eric Sack. And just happy to be here. And my goal is to just basically follow the course. So as we go through these units, just because we have just about maybe an hour to get through everything, I want to really sort of focus each set that we do on a specific unit. So again, we're doing Unit 1. And what I want to do is the main things I want to get to is just make sure everybody's upset. Everybody's set up with the replete IDE. It's very important that we get that up and running. And then in addition to that, excuse me, I want to talk about variables, variable assignments, different data types, and then finally the print function. So these are all very, very basic things. But they are concepts that we really, really need to know in order to get sort of off on the right foot. What can happen sometimes with programming courses is that if the basic tools are not well understood, then students run the risk of getting very lost very quickly within the next couple of units. And so today is just a day where we're going to get up and running. We're going to get on the same page. And I'm going to try to give very important pointers that would put you on the way to becoming a seasoned programmer. So with that said, I want to begin with the replete IDE. So hopefully what everybody has done is on this web page that you've signed up and you've created an account. And so you'll have whatever email you use and your password and you'll log in. And after you log in, you should get some kind of a screen that looks like this. And the beauty of replete. And in fact, let me do this really quickly because I want to just to be thorough. I'm assuming everybody has done this. But in the chat box, what I'm going to do is I'm actually going to drop the link just to make sure. This is in the course again. So you can navigate to this link. And once you've very quickly created a password, you'll log in. And this is what the screen will look like. And the beauty of using this online service is just because of the fact we can get up and running so quickly. There's not a lot of overhead for installations. And there's not a lot of hassle when it comes to making sure, oh, do I have this toolbox? None of that is happening. Everything that we need is right here. And in fact, replete is a great because it actually gives you several languages. So there's a ton of languages that you can actually use. For us, we want to press the Python button, obviously, because this is Python. And when that happens, when you press the Python button, you can create a new replete. And you can just give it any old name that you want to. So we'll just call this unit 1. Just call it unit 1. That's good. That's a sensible name. And then when you press the create replete will be brought to this screen. And this is really the tool. This is the engine that we're going to be using throughout the course. And the way that I'm going is that you can see that there are three windows. And each window has a specific purpose. And we're going to be moving from right to left. We're going to be starting over in the right-hand window. We'll get to the middle window. And then finally, we'll be using quite a bit the window on the left as we get deeper into the course. The right-most window is what's called the interpreter window or the command line window. That's what I call in the course the command line window because you can execute single and Python instructions and get immediate feedback for what an instruction is doing. And it also keeps track of everything that's in what's called a workspace. So the workspace is like a big package where everything is stored. And Python remembers everything that you're doing basically. When it comes to the middle window, the middle window is what I call the run window in the course because this is where you're going to be writing true Python scripts. You can call them programs. The technical name is script. So either one will use those words interchangeably. I'll get to using that today. But again, I'm going to start in the right. And then the left is for loading files and introducing a whole host of extra things that we can do. Probably we get to more deeply into units four and so on. But again, for unit one, I want to camp in the right window. And by the end of today, get to maybe possibly the middle window so we get used to running not just one command at a time, but a series of commands. And so the way that the course starts out, there's a basic operation that we all have to be comfortable with. So when you create a variable, you give it a name. And I'll just choose a letter for a variable name. I'll call it A for no really good reason. It's the first letter of the alphabet. And there's the assignment operator. And then we're going to set that variable A equal to a value of 2. And once you go ahead and do that, Python remembers. In the command line window, it remembers what A is. So if I just hit A as the variable and I hit return, you'll see that echoed back to the screen. And you'll see that A is, in fact, equal to the value 2. Now, the thing that I really want to emphasize, because I see sometimes students not getting this the first time around what the assignment statement does, it's so simple. The equal sign is so potentially deceptive, because it looks like maybe if you've done math and you've learned algebra and you're thinking you're talking about equality, it's true that you have a measure of equality between 2 and the number A, and the variable A, because that's the way you've set up that variable. But there's more to it than that. And what I think is probably more sensible to remember the equal sign as, is that if you have the variable A, I think a better symbol. And unfortunately, this isn't on your keyboard, would be that the number 2 is being assigned from right to left to the variable A. That's what's happening. And in the background, A is actually storing and remembering what that value is. However, if you want to go in, and this is where the name variable comes from, is because you can vary it. If I went and changed the number A and assigned it the value of a value of 3, let's say, and then I hit Return, now A contains the value 3. And what's just happened is that this is actually potentially very catastrophic operation, the assignment statement assigning a variable, because you basically obliterate what existed there before. And you've got to realize, as you're programming, whatever value you assigned to that variable is the value that it has at that specific moment in time. And if it's changed, if it's varied, hence the name variable, if it's varied to another value, you can't remember the other value. If you need to remember it, then you store that number in a different variable, and maybe in the variable B. And now B will have the value, too. That's kind of what you were attempting to do. So getting the assignment statement on how it works is very early on, is very, very important. It's extremely important. Some students actually I've seen actually miss this along the way. And don't get it until like a unit 2 or a unit 3. And then they realize that, oh, my goodness, I thought this value was in the variable, but it turned out it was something else. It's a very kind of common introductory error that can take place. So I want to kind of make that go away as quickly as possible, because what's going to happen is you're going to be writing programs. And the real-time execution of an instruction means that whatever variables are being referred to in that moment is exactly the values that it takes on. So right now B is equal to 2, but maybe later in your program, B got set back to the value A, which is 3, for instance. And if that happens, well, then now B contains what was in the value A. And A was set. It was reset to a value of 3. So notice A initially had a 2 in it. It was overwritten with the value 3. So we didn't put a 2 into the value of B in the variable B. We put the value 3 into B. And so this kind of volleying, this gymnastics of moving data around from one variable to another via the assignment statement is really basic. It's very fundamental. And it's something that you want to practice with in the course and be extremely comfortable with. So are there any questions right now about the assignment statement, about what that equal sign actually means? And I'll check the chat and see if there's anything there. And I can tell you, Eric, that we don't currently have any questions. We have a couple of smiley faces and some likes. So I think people think you're doing a good job. But of course, we're also in a delay. So if any questions come in about that, I'll let you know. OK. So with that out of the way and with the concept of a variable kind of under our belts, what a variable means, one thing that it's important to understand is that computers are very finicky about data representations. And we don't have to go too much into this in a course like this. But what you do need to know is that different types of data are represented differently in memory within a computer. So if you wanted to type characters because you wanted to do some data processing on text, maybe for a word processing application, the text data is called string data. That's where the STR comes from. And it's probably one of the most fundamental data types in any programming language because there's a representation for characters. When you have characters in a text context, like in a word processor, you don't have letters sitting in memory. There has to be a numerical representation for those letters to let you know what it is to let the cat out of the bag. It's called an ASCII code. But we don't need to go down that path today. I'm just kind of throwing that out there just for the heck of it. But the notion of string data is the way that you represent it is maybe I'll create a variable. I'll call it txt. And I'll assign it using a left quote and maybe just, that's not a very interesting line of text, but it's text nonetheless, is that now this is a string. And the way that you represent strings is either with single quotes or double quotes. So people have different preferences depending on what their programming background is. Python doesn't really care. It's very efficient that way. So you can either use single quotes or double quotes. I think I usually just try and stick to single quotes as much as possible. But you want to be emotionally prepared for the possibility that I'll call one text one. And then I'll call the other one text two. Now in different programming language, single quotes and double quotes can mean different things. And Python doesn't really care. So they both do the same thing. So that's important to realize. Again, if you maybe have programmed in some other language, you may have seen there are differences. There's no difference in Python. And so you can see how I've created two new variables that are string variables basically of type str. How do I know that? Well, at some point in unit one, I broach the subject of letting Python tell you what the type of the variable is. So when you use this function type, when you use it, you can actually drop the variable in. And Python will tell you what the type of the variable is. So one type of variable is called str for a string variable, which is a string of characters. And so that's one data type. And there are many, many different data types in any computer language. And in fact, the beauty of a computer language, really, as you'll see, is that we get to, in fact, create, ultimately, our own data types. We can actually do that if we want to. There are implications for creating data types. But that's really one of the main goals, believe it or not, of a good programming experience is knowing how to basically create your own variable type. So we'll get to that when we get to object-oriented programming in unit 10. But anyway, so the string variable is to handle strings of characters, basically, that are strung together. And probably the most fundamental, I'll just create some variable f and say hello world. It's federal law that you have to introduce some instruction that says hello world. And every programming course in the universe, you could go to another galaxy and you'll find that people do the same thing. It's like a universal. It's kind of like equals MC squared. You have to have hello world at the beginning of every programming course. So there you go. So I've satisfied that requirement. So that's it for strings. That's all I want to say about strings right now is you need to know what the syntax is for defining a string variable and assigning a variable a string of characters. And what you also want to be able to have this type function, which we'll always tell you the type of variable. And then if we want to move on to numerics because computers are always dealing with numbers, then I can create some variable like I did a second ago. I called it the variable a and I set it equal to originally two. And so Python remembers now that the variable is to this is numeric data. And it's probably one of the biggest things you want to get early on. And I'm not going to go too much into this, but I'm just letting you know that numbers without decimal points or integers, positive and negative numbers that don't have any decimal fractional part to them, what are called integers are one data type and they have one representation on a computer. Then there's what's called float data or floating point data. And floating point data is data that is allowed to have decimal points basically for starters. Well, we'll get more deeply into this because the float side of things is kind of deep. So we'll start with integers. Right now, if I were to say type A, this is another data type that's gone over in unit one. If we say type A, and it'll tell me that that variable is of type int because it's an integer. Or if I reset A to negative 57, then again, it's still going to be of type integer. Why? Because the number doesn't have a decimal point with a fractional part of following that number. Okay? And many programming languages kind of go into the gymnastics necessary for declaring variables. Python is very, very straightforward. It just figures out what you mean basically. So this is probably another kind of common mistake where you have two numbers and you want to divide them. And then the language is going to make a decision if you're trying to use the language as a calculator because it's trying to figure out the type of data that you're using to make the calculation with. And of course, you as the programmer, you want to be as insulated as possible from those kind of bizarre things that could potentially happen. But you've always got to be paying attention to the data type that you're using. It's very, very important. So integers have their place. And then of course, there's float data. So if I chose another variable and assigned it the variable 4.5, and then I asked what the type of that variable is, then it's going to tell me that it's a type float. So the way to recognize the difference between an int and a float is just by asking the question, is there a decimal point? That's one way, that's one way. Now in the course, there's in unit one, there's a section that goes into a review of scientific notation. Because again, computers are used like calculators, they're used for computation. So it's important to understand that decimal numbers, numbers with decimal points are floating point numbers. Here, watch this in slow motion. I'm going to set A equal to two. And I'm going to ask what the type of A is. And we just did this a second ago. But watch what happens when I just do this. One little tiny minuscule minor change. I'm going to change A from two. I'll make it B, I'm sorry. I'll make, I will make it B. I'll make, I'll do this. B is equal to 2.0, okay? If I did something like that and now we ask what the type of B is, watch this. And please, I hope you're following along as I'm doing this. The main thing is that I'm not, I don't want you to just be looking at this. I actually want you to be maybe typing along if you can to kind of get the immediate feedback of the flavor of what I'm trying to get across in the unit itself. Because there are sections of the unit that actually have instructions like this and you really should be kind of executing them along with me just to make sure that you're reinforcing what's going on. But notice, when I let B equal, not equal to B equal to two, but equal to 2.0, all right? It's a floating point number. And again, when the programmers are first starting out, the probably a small percentage of critical thinkers would say, well, what's the difference? What's the difference between two and 2.0? Mathematically, there's no difference. I agree with you. But again, it has to do with how the number is represented by the computer. The computer has to make decisions based upon those representations. And so there is a universe of difference between between integers and floating point numbers in the eyes of a computer, a major, major difference. So are there any questions about that? I just wanna make sure everybody has those three basic data types down. There's STR, INT, and there's float. So you can always assign a variable data, either text or numeric, but these are the three major ones that I want you to understand for unit one. So are there any questions about that? Any questions? So I'll say, well, good, we have our little delay. So we'll let people get a chance to answer questions. But while we had that, we had a question a little bit earlier. It was from someone, duck somebody. I didn't guess your name, I apologize. But the question was, is it best practice to have spaces before and after the equal sign? Oh yeah, so that, again, from a documentation standpoint, when you are writing, let's say, scripts, this is a good question. And this will become clearer as we get deeper into the units and so forth. But there's a couple of things I wanna speak to in this question. It's a great question. First of all, when we begin to construct scripts, we don't wanna construct them haphazardly to make the text look choppy. But one of the things that's done is to try and make code as readable as possible. So one thing you'll find that people do as a regular practice. And I would even say, yes, I would even say best practices in some sense to allow for spaces between the variable name, the assignment operator, and whatever you're trying to assign for it. But it all speaks to readability. I think that the overarching concept is readability and understandability of code. And the more that a person can do to make their code readable to another user. And again, this has to do with the choice of variable names. And we go into a little bit of that in unit one as well, where if you're writing a program, because we're not really in the run window yet. And this is a little bit early, but it is still part of unit one, where if you're writing code for an application, it's really helpful to choose a variable name that is consistent with the problem that you're trying to solve, but what the variable is doing. And so you can have variable names that could be a little bit long. They could have eight to 10 characters and they really perfectly describe exactly what that variable is doing. So that speaks to more of a best practice for readability, for understandability. And I think that's really the bottom line is that when you're writing a series of instructions, one after the other, the code, you're gonna assume somebody else is looking at it and they're trying to understand what you're doing. And you wanna sort of minimize their frustration. And as long as everything is kind of spread out and it looks nice and it's well organized. And part of that has to do with, having spaces before and after the equal sign. So I would say the overarching concept for best practices is just try and make things as readable. If you're looking at your code and it doesn't look readable to you, probably means you need to put those spaces in or you maybe need a couple of lines. So you take a few chunks of instructions and you kind of separate them out a little bit. But I would say where space is needed, use that space basically to make things as readable as possible. I come from an era where, and just people that I used to program with professionally and so forth. And it was almost as if they were writing code to be as uncommunicative as possible and to make it as difficult. So they would choose the most cryptic variable names. And you'll find this in certain sectors of the profession where people, there's a certain sectors where people love to use acronyms and they will acronym you to death. And then if you look at the variable name and it's got, it doesn't even have the acronym. It has like a portion of the acronym, and you would read it and you'd be like, what is this? And they would expect you to understand because either they're expecting you to read their mind or I don't get it, but in Python, the beauty of Python in this day and age, and I think one of the things it really does speak to good documentation and well organized code. And little things like this for best practices. Yeah, putting a few spaces where it makes things readable. So great question. I probably went off on too much of a tangent with that, but... I can just say for myself, like, I don't know what chat says. I thought that was very interesting. I don't know if anyone else loves it. And I just wanted to throw something out, someone looks like they asked in the chat. So we're gonna be doing one of these live sessions for each unit for the next 10 weeks. So if you haven't done unit one, you can catch up with us before the next one. That we'll do again next Wednesday. So, but I'll let you know if there's any other questions people have, if people have questions, please leave them in the chat. I'll make sure that you get them. Okay, so continuing on this float thing, it's very, very important. So the, let's look at this over here so I can still see that and I'll look for a hands up there. There is a section in unit one that takes you to a little bit of a math review so that you can recall scientific notation. And the concept behind scientific notation is fairly straightforward. If I have a number like 34.21, I can rewrite this in, well, I could write it like a lot of different ways but I'm gonna make a choice here. I'm gonna write it as 3.421 times 10 to the first power times 10. So scientific notation, usually you think of it as having, I wanna use the right terminology because you're probably thinking of it if you took like some form of high school math, they'll call it like the mantissa and the exponent. And that's not perfectly correct terminology when it comes to computer stuff, but I'll go with it. If it rings a bell basically, I'll go with it. But this is usually what you consider to be related to something called a mantissa. And this is related to what's called the exponent that's scientific notation. But if you really, if you wanna use the right terminology, this number is actually called the significant and this is called the exponent. And again, you can catch up on the math behind that. I just want everybody to see that if I take 3.421 and I multiply it by 10, it is in fact 34.21. Cause all you do is have to move the decimal point one point over. And in order to understand sort of another angle to floating point numbers in any computing language, by the way, not just Python, is that you have to kind of understand where these two, what these two numbers mean. Because if you were to have this number and you wanted to write it in Python, you would actually write it as 3.421E1, okay, E1. So this basically says here's the significant, or again, probably from like high school math, you probably call this something like a mantissa. So this is like the mantissa to use that word. And then this is the value of the exponent. And that's where the E comes from because it's telling you that it's the exponent. So if we, you know, just as another example, we can do a couple of these. If you wanted to write the number one in scientific notation, okay, it would be one times 10 to the zero of power. Because 10 to the zero, anything raised to the zero of power is one, if you remember your rules for exponents. So, and if not, you know, go ahead and like I said, feel free to review that unit. You know, I just wanna let you know that the number one, if you wanted to write this in scientific notation, it would look like this or really, really, really, if I wanna be exact about that, I really should say 1.0, right? Because this is a floating point number. And then to write this in scientific notation in Python, this would be one, E, zero, that's how you could write it. And this, watch this, very, very important, okay? This is critical and because it's like learning English. You know, it's like learning any language. It's like, I wanna give you like an overarching definition of a floating point number. And the overarching definition is, it's a number that has an integer part, a decimal point, and then some stuff after the decimal point, okay? But if you write the number like this, it's possible to get tricked into thinking that this is an integer because you don't see a decimal point, but this honest to goodness really, really means 1.0. And if you wanted to express this number in Python, this really would be a number that would be of type float, so sometimes, and the reason this is done on computers is because sometimes numbers could get so large or have so many digits after the decimal point that you want an efficient way to kind of represent that. Like sometimes you might do a calculate, it might happen someday where you do a calculation and you end up with like a number like three, eight, zero, one, three, four, five, really, really long number with a ton of digits. Sometimes it's just easier to represent that. It's like 3.8 times 10 to the 40th power or something like that. And you're like, oh, wow, Dr. Sack, 10 to the 40th, that's a big, well, yeah, that's what computers, sometimes what you use computers for, believe it or not. So this is 3.8e40, that's how that would be represented as a floating point number. And so that's important. So I'm gonna come back over to the replet screen and we'll just do a little bit of practice with this in the interpreter window. So I could take a number, let's say like X and I could set it equal to 1e0. And when I set it equal to 1e0, really at the end of the day, that's what Python does. So, okay, so numbers and scientific notation are by definition floating point numbers always. So those are the two cases that I wanna speak to today. There are other cases for floating point numbers, we'll talk about a little bit later on. So it's kind of hard to give the most perfect definition of a floating point number because at the beginner level because you don't know how they're represented in memory and we don't need to go down that path. That's not the point of today's unit. The point of today's unit is to help you to recognize that because of the fact as a consequence of the fact that a computer represents numbers differently and digits and strings differently, that you need to know that Python is treating those data types differently, those variable types. So there's the str, there's the int. And then all I want you to do through unit one is recognize just two possible representations for floating point data, okay? One representation is a number with a decimal point and a bunch of digits afterwards. And then another representation is scientific notation. So if I were to say type, tell me the type of the variable X, obviously it's going to come out as a float. Even though when I wrote it down, I wrote it in this, I wrote it as one times 10 to the zero effectively. Okay, question, yes. Yes, I think actually that was the question about spaces that I had put in there before. Okay, okay. Yeah, so that, yeah, we did that one. Yeah. Okay. That's a good answer from before. So that's, that was good. So, and so that's what I, that's the main, one of the major points to get up and running with a computer language is to just recognize a couple of the most basic types of data types. Now, we're going to get to other data types later on, but the one thing that you want to be able to do is in this right window, in the command line window, is that you want to feel extremely comfortable with typing really basic commands in like assignment statements and, you know, asking a function like type. And I'm using the word function. I haven't even defined what a function is, but it's just something that you drop data into and it gives you an answer out and it's, we'll stop there. There's a whole unit on functions, but this is an important, we need to at least start to broach the subject of how computers work and how you execute commands. So, so I don't feel badly about, about telling you that, that there's something called a function which will take an input and then it'll give you an answer back out. Cause that's how, that's how computer languages are built up. They're built up from a series of commands. So the type command, okay, we'll take an input and tell you what the data type is. And so, so you should always be able to go from this point forward because the question will come up. I promise you, I make, I promise you that you're going to get into situations where you'll be dealing with, maybe not even necessarily your code, but somebody else's code and you want to know what the type of data you're dealing with is. And this type command is, will be instrumental because these will not be the only three data types that we study within the course. I'm going to show you several more that are built into Python. So string int and float are built into Python. You don't have to define those. They're given to you for free. You know, you don't have to worry about it and that's the way it is. And then we're going to learn some more built in data types for Python as well. But then there's going to be a point where we will be in a position because we're such experts that we will be defining our own data types. And for those situations, you know, like I said, when you start to look at other people's code, the question, you may ask the question, I wonder what data type this variable is. And this is where this function could be instrumental. So it's an important function. That's why I choose to introduce it so early on is because it'll help you, like right now what you can do all by yourself is start going through, you know, the exercises and the instructions in the unit and you can play around with different numbers and you can test yourself. And this is really good to do. I really encourage you to do this as introductory programmers in this course is if I tell you something, you don't have to listen to me, okay? You don't have to, there's nothing, you know, assume I'm wrong and critically think about what I'm saying and then just go into the interpreter window and test it out and then make sure that you understand and that you're ready for scientific notation, make sure that you understand what integers are, make sure that you understand what string variable, it's one thing to watch me, but it's another thing to actually do it so that you internalize what I'm doing. I tell my students all the time, computer science is a contact sport. It's like you have to do something in order to internalize it. Just like if you learn any language, you learn any language, you know, I don't care what it is, you have to practice it to get good at it, that you learn the syntax because that's part of the language, you learn the instructions, but to use them over and over again, that's when it becomes second nature to you and that's the place that we have to get to in a course like this and it only comes by practicing. I mean, I command you to practice, you have to practice and that's the only way that you internalize what we're doing. Okay, so if there are no questions, I'm gonna go on. I will just say, first of all, that it's going well, a lot of positive feedback in the chat. I'd like to know people are enjoying what you're doing, just see that out here on an island by yourself. And I'd also like the point of there was some discussion in the chat. I'm gonna put it in the chat now about people trying to talk to each other outside of this chat. We do have a discourse forum on Sailor. So if you guys would like to go there, you could find students who are in this chat now, maybe who find the course later, maybe who have already found the course that you could find to talk to. So if you guys wanna go to discourse.sailor.org, you might be able to find people to have that and I'll just tell you right now, someone just said you're an excellent teacher. So that's the latest chat thing I've seen. So we could probably move on to the next thing. Thank you. Okay. So one thing that I wanna talk about is just to kind of begin to distinguish between the command line window and then the middle window, which is the run window. And it is very normal, especially at the introductory level, to want to echo information to the screen, especially when you start programming and you start to write programs, you wanna have a way, you wanna have a vehicle to be able to immediately see values of variables to ensure that the calculation that you're making is turning out the way that you would expect it. I think the program is going to do this, how do I test whether or not it's doing that? Well, one really, really quick way to do that is with the print command, okay? And so the print command is a very, very smart command. It really is, it's very smart because of the fact that you have different data types and you wanna send those data types to the print command, the print command is capable of distinguishing between the different data types. And then actually the code to generate this command actually makes a decision as to how information is going to be echoed to the screen. So clearly strings are different from floats or different from ends. And so there has to be a decision as to, if I say print A versus print X, there's actually a lot that goes into printing the difference between let's say an integer and a floating point number. Dr. Zuck, let me stop you one real quick because I think this question was answered before but it keeps popping up in the chat. So I thought I just... Oh, sure. So we have a question that people wanna know, what's the difference between the single quotation and the double quotation? I think your answer from before was that it doesn't make a difference and it's just about being intelligible in the way that you're writing your course but obviously I'll let you answer it. Yeah, I think consistency is the key. You may, I think probably about 95% of the time I try and use single quotes and then 5% of the time I might use double quotes but in Python they're equivalent. Now, if you've programmed in other languages maybe like C++, there is a difference between single quotes and double quotes. Single quotes for a language like that gives you the ability to create data types of type character or C-H-A-R. Whereas if you want to put together strings of characters to build worlds like hello world, there's a market difference between what's called an array of characters versus what's known as a string array. And so in certain other languages when you use double quotes, there are implications for that there's an interpretation of what those double quotes mean that distinguishes that string data from purely character data. And I don't wanna go up on that tangent but the language itself, the compiler will make some rather serious decisions distinguishing decisions that distinguish between characters and strings, not so with Python. Python is a very, the nice thing about it I think is that Python tries to boil things down to the most fundamental level. And so Python's position is that there doesn't need to be a difference between single quotes and double quotes. And in some sense, I understand why that happens. And in some sense, I agree with it. The problem is if you've programmed in too many different languages, you have a different perspective. So if you haven't programmed before, the bottom line is that double quotes and single quotes do exactly the same thing. They generate the same exact result. There's effectively no difference in Python. I hope I'm answering that question. I think that made sense to me. So I'll let you know if there's any other questions about it. Thank you, thanks. Okay, so anyway, back to the print command. So if I asked to print the text variable, because of the fact that they're different data types, the print command is really smart enough to distinguish between different data types. And this will become important later on is that Python has the ability to print out any built-in data type that it kind of gives you as part of the language. And so it's very comfortable and ready to handle on an emotional level. If you change your data type from integer to flow, it's completely okay with that. You won't break the language. But as you begin to develop your own data types, then you have to get more specific about, and you almost have to tell the print command what to do. And so as we go deeper into the course, we'll get more sophisticated with that. But for today, I just wanna let you know there's a command that enables you to get immediate feedback about what is contained within a variable, for instance. And so I can even get really, really cute that I could say something like, I could say something like this variable equals. So I'm creating a string. And you can actually sort of, I don't wanna say string strings together, connect strings together like this. And Python will be smart, the print command will be smart enough to know that that's what you mean. It'll actually connect those two variable, the string and the variable together. Or I could do something like this. I could say this variable equals or this var equals a. And so now you notice it's like a mixing kind of string data with integer data. And the print command is kind of stringing that all together. So you're able to put kind of like a revealing message. Again, from a document station standpoint, that's oftentimes very important. You wanna send out, when you run a program and you want the user to do something, maybe you wanna send a nice message to the screen to let the user know what they're supposed to do. So it may turn out that you want to let the user know that this particular variable is equal to a value. Well, the print command can handle that as well. And you can make the print command, you see this as we go on, you can string a whole bunch of stuff. I'm sorry, I don't wanna use the, connect a whole bunch of stuff together using a comma by connecting a whole bunch of variables and text together. So what I wanna bring out in this unit is that there exists a print command that's capable of echoing to a user what the values of variables are. Now, you might ask and say, well, we can already do that. I can just hit A and hit return. Yes, that's true. But that's only in the command line window. Okay, when you're running scripts, there won't be a mechanism for a user to kind of like enter something and then hit return. That's not how programs work. So the point of the print command is that we're anticipating that we're gonna be writing scripts and series of commands that work together. And then at some point it may become necessary to print a value out to the screen, to echo it to the screen. And that's where we want to use the print command. So kind of as the last kind of final thing I wanna do today, that's really all I want you to know right now about the command line window is that you can execute commands. Python keeps track of the variable values. And so you have a way of executing small numbers of commands. But this isn't really how you wanna use a programming language because you might use this as a calculator. So I might say something like, well, this is A and that's B and I might say something like C and we're gonna get into operators in the next unit but I would at least let you know that the plus sign is used for addition. So that makes sense, you know, it's like a calculator. So if I were to say something like that, then I could echo that value out to the screen. So notice this command also, we're gonna get into sort of mixing and matching variable types. And I'll talk about things like precedence and these kinds of concepts. But you'll notice when I set C equal to A plus B and I asked what the value C is, notice C is a floating point number. So Python has made an implicit decision, okay? And this is where you get as you get deeper into a language, you kind of, you need to know what the decisions are because it's gonna affect your calculations. In this case, Python has chosen to take that integer A and upgrade it to a floating point. Clearly floating point numbers, you would at least agree without knowing a lot about data representation that it's a more complex data type. Integers are a little bit simpler than floating point numbers from a representation standpoint. So Python assumes that the answer that you want would not be an integer value, but it would be a floating point value because you started out with a decimal value and it doesn't wanna throw those decimal values away. And we'll get more into this when we get to operators. So I'm just letting you, I'm letting you know, not only did we perform an addition, but Python performed the addition of two floating point values. And then we just echoed it to the screen by hitting return. But we could also do this. We could also say over here, print C. And yes, they both do the same thing, but watch what happens. Now, oh, here we go. Here's a question. What's the difference between A equal two and print A? So this is in the interpreter window. If I say A equal two, and then I hit A, it echoes it to the screen. So right now in the interpretive window in the command line window, they're doing the same thing. They're doing exactly the same thing. In some sense, okay? Like when you hit return for the variable A, it's almost like in the background, that print command is being executed in some sense so that it can be thrown to the screen, okay? So in the command line window, there's effectively in some sense, no difference. They'll do the same thing. But what we have to do, let's see, does Python have a double type which is similar to float? Well, funny enough, again, we'll get into other types of data types. You're asking a more complex question that I want to kind of avoid right now. But basically floats are doubles, okay? Effectively, that's what it is. And that, there are, I'll say this very, very quickly. With regard to what's called the IEEE standard for representations of floating point numbers, there is a meaning to the word float. And there is a meaning to the word double, okay? And it has to do with the number of bytes that you use to represent. For today, right now, what's happening? When you have a variable of type float in Python, it's actually a double. It's actually an IEEE standard double. And that's all I'll say about that for today. It's a great question, but I think that's just, it's a tiny, tiny bit outside the scope of what I want to get to you today. And we'll start to address that as we go on. So my, the shortest answer I want to give you for that is that in some languages you have floats, and then in some languages you have doubles, but floats are doubles in Python. And I'll leave it at that for today. I just want, I don't want to go too far off on a tangent. But- So let me, let me ask you a question here. That's not right there. So we're talking about stuff that is going to come up in the future. Now we're going to do nine more of these over the next nine weeks. Do you want to give a little tease of maybe what we'll, what we'll be talking about next week? Yeah. So, so next week we're just on the edge of what I wanted to talk about next week. If you go ahead and look at the command line window and you see I'm executing C is equal to A plus B. Python supplies us with certain built-in operators that we can do arithmetic with and compare numbers with and really basic types of things like that. So unit two is about, is about operators. And that's probably the next fundamental thing that we want to get to. And once we start to deal with these different operators, doing different types of arithmetic operations, obviously, addition, subtraction, multiplication and division, but we can do more than that. We can do a lot more also. So I want to go through the whole set of arithmetic operators for Python and what are called relational operators and logical operators. So that we're ready to in some sense be able to maybe even use Python as a simple calculator. That's a basic thing, that's kind of a basic thing that you want to use computers for is to calculate things. So we need to know how to do that. And then once we're there, then these little nuances about what comes out of a variable after you make the calculation, what's the data type, then I think that would be a more sensible place to talk about what a double is and it's representations and so forth. So that's where I'm going with this and that's why I have that last line type there. So it's a teaser, the C equals A plus B in the window is a teaser to say, yeah, we can calculate stuff once we have these variables, we can combine them in interesting ways. How do we do that? And that's what the whole discussion about operators on especially arithmetic operators has to do with. But what I want to do, the last thing I want to do over here is I want to start to introduce the run window because this is where we want to begin to execute several commands at once. So the command line window allows you to execute singular commands one after the other. But when we write scripts, we want to be able to write series of commands. And so here would be a place, now watch, this is very, very important. I can print the values of these variables out, which is one thing I might want to do and I can say maybe print B as well. And so here in the run window, this is where it wouldn't be the interpreted, the commands aren't being immediately interpreted. You're sort of typing in a text editor basically, this is a text editor where you're writing a series of commands one after the other. And the name of the script file is called main.py. So anytime you see a .py file, it means that that's most likely a Python file. And so you're using this file as a text, it's basically a text file, you can save it out and you could read it into a typical type of a text editor like VI or notepad or something and you'd see real text. There's nothing, there's no rocket science between this, for this run window, it's just a text editor basically. And the text editor will ultimately interpreted in this in replet as Python code. So that's where things get interesting. But right now I just, I could type anything that I want to in here. The editor may not like it because it's looking for Python syntax, but it really is, you could write a book report in here and save it out and you could do it then. This would not be, this isn't the greatest text editor in the world, you'd get a few nice things, but you probably wouldn't want to use it that way, but you could if you had to, if you had, you're like, oh, I need a text editor and I'm in replet, you could use it that way. But who wants to? Let's go use a Microsoft Word or something anyway. But you'll notice that in order to figure out the type, and this is the last thing I'm gonna say because we're on the edge right now, is that, excuse me, is that this is where the print command becomes important. So I'm trying to answer that one question. Is that you can't use this in the same way that you would use the command line window, okay? You've got to actually execute commands. That's what computer languages do. They're basically there to execute commands. So I initialize values A and B. And so obviously B is gonna be equal to two because A was set equal to two. And then I wanna print. So I would print out not only the values, but I'll print out the type for instance. And so how do you get this to execute? How do you get this to do what we were just doing in the command line window? Well, there's this little run button way at the top up here. And all you do is press that. And when you press that, it'll print everything out in the command window for you. So here we're asking the question, what is the value of A? Well, it prints it out, print out B, print its type and print out the type of B. And this is the flavor of the set of instructions that you'll see getting towards the end of unit one is just basically having you go through the gymnastics of setting variables and printing them out and setting variables and printing their type and changing them around and reassigning them because that's something you wanna get very, very used to. And the last thing I wanna say is you'll notice that I don't, this won't do anything. If I hit A right here and I say do this, watch what happens. Okay, I'm gonna run this again. I'm gonna hit the run button. This A doesn't do anything. Like if I hit A over here, it'll tell me the value, okay? But if I do something like this, it's not illegal to sort of put a variable name within the Python code, but Python's not going to execute anything, you see? So there is a difference. There's a slight difference between using the command line window to execute singular commands and then query Python for its values within a workspace versus writing a script and a series of commands, okay? Where you want to sort of understand what the variable names are. So that's the last thing I wanna say for today. I'll finish off by taking questions and let's see here. We'll give people a little bit of time if they have any last questions because a little bit of the delay we have here going on, but I'd just like to say, I've seen nothing but nice things said about the job you did today. I'd also like to say, remember everyone, this is part of the sailor.org course that you can find on sailor.org, it's CS105 or you can just do, you can literally Google Sailor Python and it'll show up. We'll see if anyone has any questions but I just wanna say you did a great job. No one said very nice things about me but they said very nice things about you. Well, I'll say something great. Like I said, you've got the radio voice, you know what I mean? It's fantastic, you know. Oh, Lucy, we have a couple of questions coming in here now. Again, a lot of thank yous coming into you now. Remember everyone, we're gonna be back here same time next week. What do we got here? Yes, the live stream will be normally about an hour. Yeah, I think everyone make sure you go take unit one and then take unit two. If you just took unit one and you're not here live, if you put comments down, I think that we can probably come back and answer some comments if this video isn't live right now. But I'd like to thank everyone for joining us. I'd like to thank you Dr. Sack for doing this for us and we'll be here next week at 9.30 Eastern Standard Time. Whatever that time that is, your time follow Sailor Academy on Twitter. I'm sure they'll tell you what time it is, your time. And there's a question about a console, hold on. Well, I thought I was doing a very good ending but then I got a question. There's a question about the console window, hold on, let me find this for you. Is the console window just a test screen? I would say effectively at this level, yes, yes. I'm trying to answer that in the best way possible. Some people come from a background that isn't necessarily fully windows based. There are some operating systems that work via command lines. And so that's really, it has to do with the evolution of Python as a language where when Python kind of first started out, it started out, it's called an interpreted language. It's not a compiled language. And so, and the reason it is is because you want to be able to sometimes, not all the time, but sometimes you want to be able to do simple computations in a test environment. So I think that's an okay interpretation for the time being. And that's usually sort of traditionally how that window was used. So the short answer I would say is, that's approximately correct. I'll say it like that, yes. I'll say it cautious, yes, because there's not a lot of time left. That's great. Again, thank you, Dr. Sack. Thank you everyone for joining us. Visit the course introduction to Python on sailor.org. We'll be back next week. If you have any questions, maybe we can address some of them at the opening of the next section. Next week we'll be dealing with unit two. Again, thank you everyone for joining us. And we hope you have a great week.