 So anaconda if you installed it so if you search for anaconda and your windows machine you will see the anaconda Navigator has the green snake symbol and You have another one called anaconda prompt. Okay, which is the black screen. We don't want to prompt We want the green icon. Okay, so if you launch that it will look something like this. You will have this interface Okay, so this anaconda is not python. I mean, it's not what we use for python anaconda is a it's like a a container that can contain a lot of other python programs and how python works is that after you start to you go into python programming Is that you usually develop or run python program in a virtual space We call it a virtual environment So that you are side loaded to that environment so that your program does not have to be interfered by other versions of python or versions of other programs And this is very very common in python programming So therefore you have the option to run multiple versions of python in the same machine Because of this virtual virtual space. So anaconda runs in a virtual space and this example here The virtual space that anaconda uses is called the base For the root. Yeah, the base. Okay, so if you if you click on this little drop down You can see a few of them or only one here But if you have a couple of them you see here, those are just basically different environment to run python And so anaconda is is running on its own environment called the base Now if I go ahead and click on the okay the anaconda. I think this is the one Let me let me just do that real quick So the anaconda problem will look like this and this is where you do some python coding and the black screen As some people do this because it's fast you see in the movie some hackers do a lot of the black screen That's what they do. It's much faster than using the gooey interface Okay, but you see that again here on the left side to the word base here Because we're not inside the anaconda environment. Okay, so normally you won't see that normally you will see something like Um Just without yeah, just like that the c drive Followed by the directory or the user whatever it is. Okay, so now we're inside the windows environment And then anaconda uses the base as you start to program the python You will create your own environment and it will be it will look something kind of like this here So anaconda is just a program to contain other python applications And what we use in this class is the spider id which is this one here. Okay You see the the launch icon just mean it's only installed inside anaconda These are not installed yet. So you have to install it if you want to use them But again, here's our studio if you're into our programming Okay, so in this case we're going to launch spider And if you're running spider from the anaconda navigator ID or program Then the spider is actually contained within the anaconda program environment It looks something like that and then it will have some kind of messages. You might see it says You know version 5.33 is available. This pops up all the time. I don't know if if you uncheck this It was still shopping at time. I think it's a bug or something And you won't have a welcome to spider tour. You just dismissed all of these here So this will be The id the interface And you can change the the dock background to a different one the lighter background As well, I don't know if this is better or not And as you can see it's really tiny you can see it But if you if you hold down Your control key and roll your mouse wheel here, you can expand and you know enlarge this fund here As you can see so I'll do that. So it's easier for us to see And so I'm just going to show you what this interface looks like Okay, so when you want anaconda Right spider at E. This is a default layout It will look very familiar to you if you have used some any type of id before And you're going to be arranges the any way you like By going to your preferences, but for now it will leave it as is, okay So on the on the left window or the panel here, you will see the word temp that pie If I happen to delete that you're going to see something else We'll say untitled Untitled zero Dot py and with a star Okay, with a star it just means that this file has been altered and has not been saved Okay, so This id you cannot leave this panel blank. You must have something it will always Generate one for you if you delete it. It's going to add another one and so forth Okay, so this is where you write your source code So in that diagram we saw earlier on your source code lives inside this file So python files Will always have the dot py expansion Okay, and it is just a text file It just has a dot py extension so that the python interpreter Can know that this is a python file as opposed to a regular text file Okay, it needs to know that so that once it determines that that it knows that okay Whatever I type inside this file must follow python syntax, right? So this is the coding window On the upper right You will see right below here in between you have a couple of tabs here You can add more or remove them and it's set up But this is default. We have a help you have a variable explorer. I'm sure it's a little bit tiny here Hope you can see the variable explorer. You will see that later What that means is when you create variables It will save that variable inside this space So you can see what they are the what data they have what type of the data it is and how many what's What's the size of the data? Okay for your information only you do not have this interface if you're using the visual studio code Or some other a simpler tool And this is why we chose this one because you can see all these information As you learn and in python The next one here is the plus you won't be doing this until much later in the portion with the last week of class Where you get to plus of graphs or some bar charts and things like that. I do with some Data analytics stuff. Okay, and then the last one here is the files If the files here points to the default location of of your program is usually in this example here I'm not sure what it's pointing to but Looks like points to the user my user account But it can sometimes it might point to your documents folder and it doesn't really matter You don't have to worry about this one here, but this is what you actually would see all your files and here Okay So most of the time you'd be spending time using the files and the variable explorer tabs for this upper window Down here is the console. This is the interactive python console The i python here. That's what it means. The i is for interactive python and then Has a cell number For this particular line That means that you can actually start writing python code right here and it's active its life And whatever you do here will process and so this interface here has Has nothing to do with this source code here. Okay, it's completely independent Of itself. So whatever you do here does not affect your source code But whatever you write your source code here will be outputted to the console okay so That's that's the the for that interface kind of similar to like the web page for example But do here if I go to f12 And the browser window in web development. We have the Developable console here, right? So this is the console working right javascript And this page here can actually interact with the page here, but it does not affect the actual source code of the page Okay, so the same idea here as well for this ide Okay, so, um I'll make it bigger how to do that I think Control yeah, if you want to zoom in zoom out here you press the control and then Control minus for making small and you control shift plus and then you'll make it big so you can see how Enlarge that here now. I'll do that. I'll make sure I do that so you can see Okay, so Python so this is interactive here You can test your code here on the console before you, you know, write your actual code inside the file So for example, if I type in 123 that is a python code, right? Very simple number 123 Because it's interactive you see there's the in there's the out the in here is referring to the input Uh, and then out is the output the result of this statement So this is a very simple python code Do 123 here is what's called a literal constant For a numeric constant because it's just a number, right? It doesn't do anything. We just write it and it would just automatically output that to the console you can see there And then it moves on to the next slide now if you have used jubilee notebook, it will look very similar to the jubilee notebook interface as well now when I Create a variable. So the rule in python when you create variable is that Use you must start with a letter Okay, or I think or underscore and then we'll talk about that later next week. We'll talk about variables But let's have a Call a variable called pet Okay, and I'm going to assign this path. So the assignment is the equal sign So pet is equal to and let's say if I put your number five, right? So if I hit enter Okay, here you see on the top up here I can't make the large you see the name pet here This is the variable name that I created called pet has a type The type is called int int which stands for integer And it's just a whole number And then has a size of one. I mean it's about like a one one byte or Energy is a little bit different size. You look at carefully different and then the at the actual value that it contains Okay, so that information here is really helpful when you write code and so Now pet exists in memory here. This is in gram In memory as you as you go Um, so if I go down here and type pet hit enter You will see that the result of pet is actually value five. Okay So you see that we have five set to pet Now what I mentioned earlier that python is a loosely typed language So the type for this variable pet is actually the integer type So in java, for example, you would you would have to say And and pet equals like five or four, right? You have to do that because you have it's a Statically stately type. It's a Strongly type you must define the type first before you can use it to assign a number But in python, you don't have to do that okay, so because initially it says Type five if I go back and put pet again Now if I sign that with a string a string in a python You would wrap it with a pair of either a double quotes or single quotes like this Inside here pet pro like a cat Okay Now what happens when I hit enter key? The name will stay the same the type will change and the size and the value will change Okay You see that now it changes From initially was an integer type to the string type now st army string It's a character and it has a size of three three here is three bytes Every character is a byte. So three characters. It's got three bytes and then it has a value cap So you can see that pet was initially an integer and then now it changed to a string So if I if you're not careful if if I try to do like oh Initially a pet was fine. I thought and I want to say pet plus two or three and you get an error, right That is the danger of python With these terrible languages. So before you can do any operations You have to determine or you know define or check what pet is. Is this still a number or not? okay, so just give you a And overview what that is like as you code and later So that is a little bit about python And so instead of doing in the console here, you'll see that most of the time I'll be doing here because you want to process something really really fast Before we do anything else But if you want to keep your code then you want to write over here Okay, so this is a file with a start and it has it has not been saved yet If you don't save it you might lose the file So make sure that when you create a file like this you want to save it So let's say that I want to save this file first Um, you can click here or control s and it's going to ask you where to save your file So for this class, I'm going to save it into my a document folder And I will create one here Uh, not quite done. I will just create one here Call it sp23 python So this would be my project folder for the entire course, okay? I'll use this folder here for sp23 python click on that folder and then I give it a name for this file and actually, um You know what in here I will create another sub directory And I'll call it, um, you know unit one Okay, you know one you create unit two unit three inside this folder here. So you can access everything here So it's a unit one. I will use this single file called Demo that pile Okay So here's my file has been changed to demo that pie the star is gone now It's it's ready to go and I can start write code Okay, so what you see here is automatically generated by this idea These are called just comments so in python you use the pound sign to Comment your code common just mean you just annotate your code You kind of describe what your code does I'll be asking you to do that quite a lot actually as you go and then This is also another piece of comment. We'll look at this later. So like a couple ways to do that But the the common way to do that is using the pound symbol So when the interpreter comes To your code it will read every line in your statement here line by line If it sees the pound sign Then it knows that this line entire line is just a comment. It's not going to compile it It will just skip that line And then here is also another way to write comments. It's differently using a pair of three Single double quotes or three single quotes like this is fine, too Okay Like that So hi like that. Okay. That is also another way to comment your code And you just have to ensure you match the the opening and the closing. Okay, if you don't do that It's assuming that there's an error So these are the three ways how you can write comments in your code Okay, you can choose either one. It doesn't really matter If you want to write like multiple lines of comments, you can use this approach This one here the pound sign can only allow you to write one statement at a time her line So you can't use like multiple lines if you go down here protect something Right, this is now an error Because this line here is a Is expected to be a python syntax because it's not valid So therefore you see this with red x over here if you mouse over that It will tell you it's an undefined variable called hi. Okay So if you want this to be a property comment, then you must include that pound sign in front of it. So that again, that's another common statement They can see how tedious can be you have like long lines of statements to describe your program is And then with end up with a lot of pound signs like this and then you describe what your program does As opposed to this you can go with this approach using your triple quotes here and here and then you Put your comments in here Yeah, I think it doesn't really matter This is a little bit even though this is used as a comment. This is actually a string Yeah, so you watch it parse by Python by the way if you happen to put a Like that, right? So it's an error. It's supposed to be a string But because Python does not allow you to do that Like you would in other languages So they would use this to write statements. So You will see this it's quite common, but it is not it's not a big big issue