Python Tutorial 5: How to Install Visual Studio Code

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys this is paul mcquarter with top tech boy.com and we're here today with lesson number five in our incredible new tutorial series where you're gonna learn to code in python or you're gonna die trying what i'm going to need you to do is go ahead and pour yourself a nice strong cup of black coffee and i'm going to need you to get ready to learn some cool new stuff hey as you're pouring your coffee as always i want to give a shout out to you guys who are helping me out over at patreon it is your encouragement and your support that keeps this great content coming you guys that are not helping out yet you can look in the description down below there is a link over my patreon account think about hopping on over there and hooking a brother up but enough of this shameless self-promotion let's jump in and talk about what we are going to learn today what i'm going to show you today is how to install a better integrated development environment for python now we're still going to be using the same python program we're still going to be using the same python language but instead of interacting with python through the idle we're going to be interacting with it through a better integrated development environment because really my friend idle is just kind of a dumb text editor you write in text you save it and then and then that text file is run in python and if you have a more organized uh integrated development environment it really makes things a whole whole lot easier makes it easier to keep your programs organized and makes it easier for you to install new things and so we're just going to take that and what i've done is is that trying to keep everything possible free for you i've found what i think is the best free integrated development environment out there and what it is is a visual studio code and believe me i tried them all so you don't have to and you can just take advantage of downloading the one that i think is the best and the simplest to use and it is called visual studio code so let's get that installed and i think you're gonna love it because i love it i love it a lot okay so we are going to come up here and i'm going to get out of your way boom i'm out of your way and i like to use the most excellent duckduckgo but use your search engine of choice and you want to search on install visual studio code and boom right here we're taken to code.visualstudio download with an upper click case d we're going to click on that i will be showing you how to install it on windows 10 but if you're on a different platform you can install the linux version here or the mac version here the installation should really be the same on on all of these so you can follow along whatever you're playing along with at home feel free to continue it should be the same so i'm going to click on this windows button here the big windows button and it takes me to this page you look in the lower left of chrome and you can see that it is downloading that executable which will install the software for us i have a pretty fast internet connection so it went pretty quickly i'm going to click on this and then it's going to open up the installation okay i've got all of these terms and conditions probably agreeing to give them my stem cells and my firstborn and all of that but we're going to go ahead and live dangerously because i'll give you a clue if you say you don't agree it doesn't let you install the software so whatever they're asking for here we're going to agree to it and we're going to say next and then it wants to put it in this folder that looks like a good folder that's fine then uh do you want to create a shortcut yep that sounds good and then this is uh uh kinda i like to go ahead on additional icons and say create a desktop icon and then it is kind of important to have the the box checked that says add path and that way uh you know that way it can always find it if you put the visual studio program in the path then windows will always be able to find it so yes you want that box checked we will say next and we are ready to install click it'll take a second so we'll just sit and chat a little bit and enjoy some coffee i think i'm gonna have to make another cup of coffee this one is getting consumed fairly quickly here it's a little bit of a cold day out there today in west texas still so i'm really enjoying the hot coffee looks like we are almost done okay boom and i've got clicked here to go ahead and launch visual studio code and i will click finish now and boom okay we are uh up and running okay so what i'm going to show you here is i am going to show you how to get this configured i'm going to see if i can make this yeah i think i can make your look at that through the matte magic if you wonder how i'm doing that it's control plus i actually learned that from one of my students the other day he said sir do control plus and we can see what you're doing better you don't have to just make it whatever size is easy for you to read but what we're going to do is we're going to start by we're going to want to open a folder but before we open a folder we want to create a folder so this is going to be a folder that's going to be kind of like the master folder that we're going to be doing all of our programming in and a natural place for you to put it would be probably just in your my documents folder and then you could right mouse click and then you could say new and you could create a new folder in there and you could call it python files i've got a little different place that i do a lot of python work so i'll come over here to that and then what i'll do is just what i told you to do it doesn't really matter where you put it you just got to keep track of where you put it so i'm going to say new folder and then i am going to say python files now just a little pro tip here i never on any machine ever put spaces in file names or folder names because there's some things that if you get into linux and you have spaces in your file names or spaces in your folder names it can be really bad so i just always have a habit of never putting spaces in file names or folder names but i'll click enter and now i have that program that python files folder created and then we want to come back over here and we want to do open folder okay open folder you see that now if you clicked around let me see something here can you give me just a second give me just a second here i think that i can try to give you something that is a little bit easier to see yeah okay and you can still see through it let me adjust that a little bit [Music] okay so you can see now where i'm pointing a little better you like that i think it's kind of cool okay so now before you click on open folder or i'm sorry uh we already created the folder now if you clicked around and lost this you can always come up here to file and then there you can say open folder there as well in case you get lost but since we uh since we already have it here i'm going to click open folder and then i'm going to navigate over to that folder that i created a second ago and i did not mean to click on onedrive all right and then okay there's that folder that i created called python files and so i'm going to click on that and then i'm going to say select folder all right now if we look over here to the left and let me see if i can do a little bit of windows management for you here i just want to make sure that you can see everything that i'm looking at okay if you look here now you can see there is that folder called python files all right now this is where you can write your programs and in fact you could create another folder inside of here like if you wanted to create a folder that was called like you know my programs or tutorial examples or whatever you could organize things further in here but right now i'm just going to be putting my files in here this clicking would create a new folder see it looks like a folder this would create a new file and those two icons look kind of similar so if you're not careful make sure that you're not creating a folder when you want to create a file but i'm going to come in and click on this and i'm going to just say hello world and then dot p y and remember the dot p y is kind of important all right now look at this what it recognizes is is that you have not i better get further out of your way if you look down here if you look down here you can see that it recognizes that you have not set up python yet inside of visual studio code and it dot py hey this guy wants to work in python but he hasn't done it yet and so what i'm going to do is yeah i'm going to go come on over here and say install python and then if you look here it says installing and so what we're watching is this little blue button here and waiting for it to go ahead and get installed it's taking a second we will not panic okay and now i was getting a little worried because it seemed to be kind of stuck there but you see how it says installed and so that is a very very good sign okay now it says python extension is now installed some features might not be available until a notebook or interactive windows session is restarted and so okay we're not going to worry about that we're just going to say ok and then it says pylint is not installed let's go ahead and install pylint okay so i'm going to click that and let's give it a second there and you can see it's trying to do some stuff here alright looks like it's happy pilot is just something that kind of helps you debug and find errors i don't really use it that much but i figure one of the things is if you don't go ahead and install it uh one of the things that can happen is you can keep getting a reminder on it and so that just sort of makes it shut up to just go ahead and install it okay now i want you to see up across here you have different tabs okay and so this python getting started let's go ahead and kill that tab python extensions let's kill that tab now we are back to this hello world file that we this hello world uh tab that we created the hello world file that we created and we're also over here we have the welcome which is where we started and so i think i will kill welcome and now i have got basically at this point i am back to where you would be here in idle where you're ready to write a program but you see now instead of this being a text file that you're just working with on your own you can see that it is inside of a work environment and let's see here now what you can do is you can see over here to the left you have kind of lost your folder and that's because you're down here in extensions you move to this tab and this is a debug tab we won't really talk about that uh this is a source control we won't talk about this this is a search bar but where we really want to go is back here to our navigation thing so you can see here is our folder python files here is our pro our program or our file hello world okay and then also i'm going to show you one or two other things uh let's see if i come here file i can uh preferences you can set different things so like if you want to work with your fonts and things like that you can set that there but it looks like the default is really pretty good and so i can claim i can close that just kind of looking around here a little bit to see if there is anything here that i need to show you right now oh yeah this is what i was looking for so we're under file we're under preferences and you can change your color theme okay so like if you like a light you can come up to visual light and then you've got white with back uh with a white background with black text and i've gone back and forth but my audience has kind of told me over the years that they prefer the dark background so i'm going to come back and i'm going to go visual studio let's try can be dark now i don't like that very much let's go to file preferences you can play around with these color themes and see if there's anything that you manaki dimmed that one's not too bad there's some additional ones that are pretty good but i think the best one for right now is this just the dark visual studio so that's the one i'm doing looks like that is pretty readable for you guys i think i'm going to just step it up a couple of clicks in size to make sure that you can see it well all right i think you should be able to see that really well and then i'm going to adjust this window here back a little bit okay so you see i want to get it where it's really easy for you guys to see what i'm doing and so this is the name of the file all right and so you see i can i can close it there and now i'm back to not having anything and then i can come over here and click it and it opens it up again and you can also uh have more than one program open at a time you can kind of go to put split screen and you can work with two programs at a time so maybe you're editing on this one over here as you were looking at this one over here but we're just going to go with one and then here i'm going to say print and then we are going to print can you guess yes hello world and then we are going to come over here and this is the run button up here so we're going to come over here and run boom look at that and where do we get the result we get the result down here in our terminal window so you can see that you've got kind of a windows terminal down here and uh let's see yeah this is just kind of a windows terminal that you have down here and that's where it sends the output to also let's just do something that we had learned earlier let's come here and say let's just say name is equal to and then we're going to say input and we're going to say who are you question mark space and we put that in name and then we're going to come here and say print and you see what it's trying to do is these pop-ups it's giving you suggested values and so this just reminds you what the possible parameters are on uh on that print command okay and if it bothers you later we can figure out how to turn that off like right now it is really in the way and i killed the whole program never fear we will go back to visual studio code what's happened is is that i've enlarged my window so much i've enlarged my window so much that uh that that suggestion box for improved python editing with better and faster auto completion install the new pylance extension uh i'm just going to say no okay so i'm going to print what am i going to print i'm going to print hello comma and then i'm going to put comma and i'm going to put name and then i'm going to put comma and then i'm going to put i'm going to put let me make this smaller so that is not as annoying let me see how to make this smaller yeah there it is okay i think you can still see it and now it's not it's not covered up so i said hello and then i'm putting name and then i'm going to put welcome to visual stu studio code all right so let's see how that works and so now we're going to run this and then it says who are you now this is what i want to show you you've got to click here to answer it and so then i'm going to say paul and then it says hello paul welcome to visual studio code all right so your input and output is going to come in this terminal down here and it is a python terminal so that's where your output is going to come is down here to this terminal so now i'm going to run it again and this time it looks like it actually places the cursor here but never assume the cursor is there you always need to kind of click on it there to make sure that it is there i click enter and then hello paul welcome to visual studio code boom all right now what we're going to do is like next week what the lesson is going to be lesson number six is going to be i'm going to show you how to do if statements and conditionals you're not going to have any homework i guess your homework for today is just use this to play around with the things that we learned in the first in the first four lessons just play around with this and then save your programs over here with program names that make sense like remember how i taught you how to do arrays we'll make a little program over here called arrays.pi remember how i taught you how to get user input make a little program over here called user input and that way if you ever go away and forget you can come back and you have some nice example programs that show you how to do the basics how to get user input how do you have statements how to do all those different things that i'll be teaching you and so you will have those programs over here so just play around write a few programs and then next week what i'm going to do is i'm going to teach you how to do if statements and conditionals now if you have gone through my arduino series of tutorials which i certainly hope you have then you already kind of understand if statements but i'm just going to be showing you the syntax of how to use them in python okay guys this has been kind of a fun lesson you're going to learn you're going to love visual studio code and the more you use it i think the more you're going to like it and it just makes coding a whole lot easier and so i hope you guys are having as much fun taking these lessons as i'm having making them if you like this video give us a thumbs up really helps me with the old youtube algorithms if you haven't subscribed already click that subscribe button when you do make sure you ring that bell so you will get notifications when i have new videos coming out share this with other people let's see if we can grow this channel let's see if we can get some more people that are doing something useful with their time okay guys thanks for tuning in this is paul mcquarter from toptechboy.com i will talk to you guys later
Info
Channel: Paul McWhorter
Views: 16,201
Rating: undefined out of 5
Keywords:
Id: ezXiJPvw6cY
Channel Id: undefined
Length: 21min 11sec (1271 seconds)
Published: Wed Mar 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.