you need to learn Python RIGHT NOW!! // EP 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
You need to learn Python right now. Hold up. Why? What, why do you need to learn Python right now? The biggest reason right here, if you want to get a job in it or information technology, or you want to advance in your current job, man, you've got to know Python or at least learn it. Soon. Network engineer, Python, cloud engineer, Python, ethical hacker. You guessed it Python. And honestly, that's my list. That's my one reason. Do you need another reason beyond the fact that Python is just cool and amazing and magic? Nah, probably not. So welcome to episode one of my Python core. Want to teach you everything you need to know to become dangerous and Python. And we're starting from zero. Like I don't know what the junk Python is. Zero. No pre-recs. And by the end of this course, my goal is for you to have the skills, just to be awesome and Python and whatever job you have. So yeah. Get your coffee ready. We're going to learn some Python and also a massive shout out to the sponsor of this entire series and the reason it can be free here on YouTube. It pro TV. If you want to learn anything in it, they are my number one choice there. What? I used to learn stuff. Cloud hacking Linux and yeah, you guessed it. Python like check out this awesome Python hacking course they have. So check them out. Use my link below or code network Chuck and get 30% off forever. All right. Now let's start learning Python. So first, what do you need? What do you need to start? Learning Python? Nothing. You won't need anything to start learning Python with me in this course. Yeah. You can install and run Python on any computer Linux, Mac PC, but we're not going to mess with that because that takes time. And we're going to learn Python right now. I want you to start coding immediately right here in your browser. And that's all it takes it. Computer with a browser or heck even a phone with the browser. Oh, hold on. I take that back. You won't need nothing. You'll need, um, you'll need coffee. That's required just this. But anyways, check that link in the description. You'll get access to my free Python lab through my free membership. So click that link below, get signed up and let's start coding right now. Now you'll know you're in the right place. When you see something like this, this will be our Python environment. Our lab now real quick. I want you to click inside here. Just any line in here. 1, 2, 3, 4, 5, 6, doesn't matter. And just start typing. Oh wait. What's going on here. You are invited to create a free replica account. Replica is the tool we're going to be using to do all of this Python stuff. And if you want to be able to edit your code and save it, come back to it, all kinds of fun stuff. You're going to want that for account again. It's free. Don't worry about it. Just do it real quick. Once you're signed up, they'll come back and things will be great. And once you have an account and you start typing in your editor, it'll give you the option to fork it. Which sounds funny. I know which basically means creating your own version of what I've typed in here. Going click that it's fine. Forking. And now right here in your browser or your phone or whatever you're using, you have a Python lab. So let's not waste any more time right here on line three. Let's just start coding. Just copy what I do real quick. We're going to write some code type in the word, print print, and then type in left, parentheses, quotation, mark. Notice it's filling in stuff for us as we're doing that. So it's like magic. I'm telling you and the type in hello world exclamation point actually let's do a couple of those four or five, six or 10. Cause we're super excited to learn Python and we're triggering lots of coffee. I hope that's your code. We're done going click on the play button up here or the run button and let's watch what happens. Run. Boom. Okay. Hello world. Down here in our Python terminal, we just ran Python code. That's it. We're done. Your code are now. No, let's talk about what we did here. So when we said print, hello world and Python, we gave our computer a set of instructions. We said, Hey computer. I want you to do something for me. I want you to actually say out loud or, and the terminal hello world. And of course he said, okay, I'm doing it. And boom, hello world. We basically made him talk. But we had to tell him in a language he understands, which is why we use Python. Python is a computer programming language. And while this is a simple example at the end of the day, that's pretty much all we're doing. When we're using Python, we're telling our computer what to do in a language. He understands now, as we go further in this course, and we go deeper into Python, we can tell our computer to do more advanced things like, Hey, go hack this other computer or go hack this network. Or we might tell the computer, Hey, can you make this configuration change to all the devices in my network? And it will automate that really? You can do anything with Python and that's what makes it amazing. That's why learning Python is like learning how to do magic. So let's keep learning some magic. Let's take another look at our code here. So this point we know that when we said print, hello world, we told our computer to say hello world, but what's actually going on right here. Let's break that down. So first, what is print? What is that thing doing in Python? This is called a function which we'll cover more on later. Let me show you how to create your own functions. Just no for now it's code. That does stuff. And in our case, the stuff that it did was make the computer talk. And in Python, you know, what's a function. When you see these parentheses right here, open and close without the hello world. It'll look just like this. Now this next thing is a huge concept. The south in between and our function here, that sucker is what's called a string. You are going to use this so much in Python. So just get this in there. Here we go. Coffee break. Who? Yeah, here we go. A string is a sequence of characters or the way I like to think of it. It's just text. So looking at hello world here, we have our characters H as a character E I mean, all of them are w even this space right here in between is itself a character. And when we combine those characters together in Python, it's called a string. Now, how do you know if something is a string in Python? And he guesses, you will always see a string with quotes around just like this. Bam, double quotes also be single quotes. So if it's like a one line from each side too, you get away, boom, boom, just single quotes. That's also a string you can use either or, but my personal preference and what I recommend is to always use double quotes. It's just better, but whatever you pick, just pick it and be consistent. And also, do you remember this got a challenge for you for the next 24 hours? Every time you say string, I want you to quote it. So string string just do it or don't I don't care, but it's a good way to remember. I think let's get back to our lab for a second. Let's try printing more strings. So follow along with meals, print our ones we'll type in print using our print function. And this time, you know, let's go crazy. Let's do a single quote, just single. And we'll say I am iron man. Just like that. Let's go ahead and run that code. I clicking our start button up here. Our run button run and boom. We just coded again. Hello world. I am iron man. Let's keep practicing. Let's do another one. Print. No comma. I am Tony stark. Let's do another one France. Now I have a point to this. Just follow along. No comma. I am now let's print that out. Cool. So we have a lot of print functions, printing some fun stuff all real quick. Just underneath that last print function, let's do this. Do a hashtag hashtag insight bin. We are practicing Python. It's awesome. Now what just happened here? Let's try it out. Let's run the code. Uh, nothing. Nothing, nothing happened or nothing happened differently. Right? New concept time. Notice we also have the same thing up here. The hashtag, Hey, there's nothing here. Wake up. Then we have this. When you see a hashtag or a pound sign, we're telling our computer, don't read this the same for you, buddy. This is for humans only. We're telling our computer to ignore that line in our code. This is called a comment. And it's for us. It's for people. It's for you. As you're coding, you can make notes on what you're doing. That's for the next code, or that comes behind you and tries to make sense of the crap you coded. You can go, oh, that's what he's doing. Cause he made a comment. So whenever you add a pound sign in front of something, that immediately will comment it out or just tell the computer. Don't look at this. It's not for you, buddy. That's really handy. When, for example, I have the print, hello world. Up here. This is code the computer will read and run. But maybe just for this next time I run my code. I don't want that to be included so I can just put a pound sign or hashtag right in front of it. And bam, notice it changed color. It's being ignored. Now you've probably noticed this far, that things change color. When we do cool things in here, this is a Python IDE or an integrated development environment. So it's definitely more than a text editor and it does cool things like that to help us code Python. And a lot of ways, it's like a spellchecker. No, when you're typing in Microsoft word or whatever you're using, if you misspell something, it'll tell you underline it with red, kind of the same thing here with coding. So actually let's try something real quick. So we know that here, when we printed the string, no I am poppy. We know what the string, because there are quotation marks, but what if we remove those? What would happen? Let's try, let's remove them remove the last one. And the first one, it was, first of all, it changed color. And then we try to run it. Watch what happens. Ah, it's your first big, bad red error, syntax error, which you're going to, by the way, get used to cause you're going to see this a lot. And it's fine. If you see it, every programmer sees this. Every person who ever starts writing Python or any kind of code will experience this constantly. And you're one Google away from understanding what this means. Now here it's like saying, Hey, you probably meant to do a string and you didn't and it's invalid syntax. Add those quotations back in their sucker so we can run this code problem solved. So now you know what strings are, but what do you say? We have some more fun with them. Let's cover some string basics. Yeah, let's do this strings basics. So we've got a task force to help us learn these strings basics. Right now we have three print functions in our program. I don't like that. Where I want us to do is get down to only one print function. I want us to print this entire thing with one print function. And not just that. I want it to look just like this. Exactly like this each on its own line. And there are multiple ways to do this. So we're going to learn a few things about strings as we try. Now, first of all, if you already have an idea of how to accomplish this, pause that sucker, pause this video and see what you got. Now. If your first thought was like, Chuck, this is pretty dang easy. Instead of doing three separate strings, let's just write one big string that has all this text inside. It's good. Thought. Let's try that first. I'm gonna comment out all this code so I can keep it here for reference that way. It's not going to be run though. Come down here and start typing away. So we'll do our one and only print function and then our double quotes and I'll type in white text. So now we're using one print function with one string. Let's see what happens. Let's run our code. Right? Okay, cool. We did it, but we didn't do it right? Because I wanted each of these things to be on their own line. Right. We might think, well, this is just text. I know how to add a line in text. You hit enter after the sentence. Right? So there and there, that should do the trick. Right? I am iron man. I'm Tony stark, non poppy. Let's see what happens. Oh, good. Old air. Now you probably noticed immediately that, uh, some things change as we change that Python no longer recognized that this entire thing is string it. As soon as, since we hit enter to add a line break, we were done with the print function and we just did it wrong. There is one really easy way to fix this. You see this right here is just irregular string, but there are things called multi line strings. I'll show you. We're going to add some extra quotes. So I'm going to go up to the top here, right at the beginning of that string. And I'm going to add two more quotes. So now I have three double quotes. I'm going do the same thing at the end. Notice our color did change. So we're back in action there and let's run our code and see what happens. Oh yeah. Look that mission accomplished this. My friends is a multiline string. That's exhausting. Three quotation marks. We'll take care of that for you. And we can do whatever we want inside that string. We can add a bunch of space. Pretty cool. So that's one way to accomplish this in one print function, but that's two. Nah, I'm going to make it harder for you for the next challenge. I don't want you to, to make one big long string. No, no, no, no. I want you to keep these individual strings in one print function again. If you already know how to do this, try it out. Pause the video. If you don't, let's do it right now. So this will start to open your eyes to the magic of strings and Python. So once I've been prints type in my first string, I am iron man. How do I add another string to this print function? One way is to add them together. I'm going to do a space, a plus sign, because that's what you do. When you add things, you use a plus sign. Python is no different. And I'll put in my next string. No, I am Tony. Sark let's go and do the next one space plus, and then no, I am poppy. Now this is a bit magical here. We have our three strings and we're adding them together with the plus side, which puts a whole new spin on word problems. This is commonly referred to is concatenating. Did I spell that right? Yeah. I think so. Concatenate or essentially combining things together. So do you think this will solve our problem? Let's try it out. You probably already guessed. No, but let's go ahead and run it. It's going to have a problem. You're probably not anticipating though. So this is going to be fun. Ready? Let's run it. Okay. It definitely combine them. But do you see something off about this, bro? You did give us spaces between our sentences. That's basically grammar Python. Come on. What is this? This combining them like, you don't know how to speak and the computer doesn't write the computer. Doesn't speak English. Doesn't understand this crap understands Python. And we literally told him to do that. That's our fault. What do I mean, look at this. We said, take this string and combine it with this one as a human we're thinking. Yeah, those are two sentences. Put a space between sentences. The computer's like, um, I don't see the space character there because space is a character. He hasn't seen, he went here and he doesn't see anyone here. So he just assumes, yeah. You want me to add those together? Then I'm going to add those characters together. There is no space character. There is no spoon anyways. So how do you think we fixed that? Glenn, pause the video and try it real quick. It's it's very simple. So don't make it too complex. Just try to fix one of the easiest ways to fix this is by simply adding a space. So like for example, here I am iron man. We can add a space and I forgot my period earlier. So I'll add a period. Just add a space at the end of that string. And when I run that code of Wala, we've got our space character there. Let's do the same thing over here after our second string and our second sentence period space, I'll run that code. Beautiful. It looks better. Doesn't it? Yeah, we did not complete our mission. Remember I wanted each of these sentences or each of these strings on their own line as we did before. So how do we fix this again? If you already know video and try it, let's keep going and easy way to fix this is this handy hack right here, right in the string. I'm going to do a backslash and the letter N and that's it. So notice it is inside my string as part of the string. It's a character. Let's run it and see what happens. Boom and bam. Okay. So it created a new line for us that backslash in end is called a new line indicator character. And it does what we just saw it did and sort of fix the rest of our stuff to make it look great. Let's go and add one more new line character to our second string backslash N AML run that code. Now we did it and that's awesome. But notice, um, it's a little wonky, got a little extra space right here. We may not want, how do we fix that? We'll get the, computer's going to take exactly what you told to do in Python. So notice up here in our second string, we've got the new line indicator and the right after that, we've got the space character, and that's where that guy ended up right there. Sort of fix that. We just simply eliminate that space and run our code. Beautiful. Now, can I show you something that will make a lot of sense right now, but it's super cool. And I just have to show you. Okay. Let's try it out. So, um, let's give it lush space here, type this with me. Print for the CS, for our print function. We're going to print the string. And then right after that, string had a space and asterisk space and type in 100. Now, what do you think is going to happen right here? I'll give you a hint. The Astros right here, Python reads. That is multiply. You ready? Let's run our code and run. Boom, boom, boom. How cool was that right? Talking about word problems. We can do stuff like that. Yes. Python is powerful man. Now to make things cleaner and cooler. What do you say? We add our new line indicator character. Where would we put that to make it all on its own line? Try it out real quick. I'm going to do it here. Backslash in right after poppy. Let's run our code now. Oh, gorgeous. I. Am poppy. I poppy. I am. I am. I am popping poppy. Ooh, we covered a lot today. First we established that. Yeah. You got to learn Python right now because if you want to be in it, that's kind of the standard now. Sure. It doesn't necessarily have to be the Python programming language. It can be something else. But the defacto standard right now, the most popular one out there is Python for it. Professionals. I've been saying it for a long time. Check my previous videos, you got to learn Python. And the best time is always right now. We also covered, Hey, what? The junk is Python. At the way, we talk to our computer to tell him what to do to let them know we're the boss. And then we saw how we could tell him to do a few things like, Hey, talk computer, print this out. We learned the print function. We learn what a string was also multiline strengths. And then we learned some strings basics. And while we covered a lot today, we are just scratching. The surface Python gets so much more fun. And in the coming episodes, just a bunch of mind blowing moments. Anyways, that's all I have for episode one. Let me know what you think in the comments below. Is there anything you want me to do differently, better or less of? I don't know. Let me know. And also don't forget to hack the YouTube algorithm today. Like this video comment, notification bell subscribe. We've got to hack YouTube today. Ethically of course. And of course a massive shout out to the sponsor of this entire series. It pro TV. Again, if you want to learn anything in it, if you want to become an it professional there, the best place to go to learn this stuff. So link below or code network. Chuck, you get 30% off forever anyways. Yeah, I think that's all I have. Uh, keep a lookout for future episodes. They will be coming out here. I'll catch you guys next time. [inaudible].
Info
Channel: NetworkChuck
Views: 525,459
Rating: undefined out of 5
Keywords: Python, python for hackers, python for everyone, python for everybody, python right now, you need to learn python right now, learn python, python for beginners, python tutorial, python programming, how to learn python, python full course, python course, learn python programming, python tutorial for beginners, cyber security, ethical hacking, python 3, python language, python programming language, python crash course, python basics
Id: mRMmlo_Uqcs
Channel Id: undefined
Length: 17min 41sec (1061 seconds)
Published: Sat Aug 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.