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

NetworkChuck
14 Aug 202117:41

Summary

TLDRThis video script is an enthusiastic introduction to learning Python, emphasizing its importance for IT professionals and job seekers. The host guides viewers through the basics, starting from zero, using an online Python lab for immediate coding practice. The episode covers the print function, strings, multiline strings, and string concatenation, providing a hands-on approach to coding with Python. The video also promotes Itpro.tv as a valuable resource for learning IT skills, offering a discount code for viewers.

Takeaways

  • 😀 Learning Python is essential for job opportunities in IT and for career advancement in related fields.
  • 💼 Python is a valuable skill for various tech roles, including network engineers, cloud engineers, and ethical hackers.
  • 🔮 The speaker emphasizes the 'magic' of Python, suggesting its versatility and powerful capabilities in programming.
  • 🌟 The course aims to teach Python from scratch, with no prior knowledge required, and targets making learners proficient.
  • 🎥 The video series is sponsored by itpro.tv, which offers learning resources for IT professionals, including Python.
  • 📚 The speaker introduces a free online Python lab for immediate coding practice without needing to install Python locally.
  • 🔑 The concept of a 'string' in Python is introduced as a sequence of characters enclosed in quotes, which is fundamental in programming.
  • 📝 The script explains the use of comments in code, marked by a hashtag (#), to provide notes for humans, ignored by the computer.
  • 🔍 The importance of correct syntax in Python is highlighted, with an example of a syntax error caused by missing quotation marks.
  • 📈 The video demonstrates string manipulation, including concatenation and the use of newline characters for formatting.
  • 🚀 The speaker concludes by emphasizing the vast potential of Python, with many more exciting topics to be covered in future episodes.

Q & A

  • Why is Python considered essential for IT professionals or those looking to advance in their current job?

    -Python is essential because it is widely used in various IT fields such as network engineering, cloud engineering, and ethical hacking. Knowing Python can significantly enhance job prospects and career advancement in these areas.

  • What does the speaker suggest as the first step in learning Python?

    -The speaker suggests starting by using an online Python lab to begin coding immediately in a web browser, without needing to install anything on the local machine.

  • What is the purpose of the 'print' function in Python?

    -The 'print' function in Python is used to output text to the console or terminal. It's a way to communicate with the computer, telling it to display a certain message or result.

  • What is a string in Python and how is it represented?

    -A string in Python is a sequence of characters treated as a single entity, often used to represent text. It is represented by enclosing the text within single or double quotes.

  • What is the significance of using comments in Python code?

    -Comments in Python, denoted by the '#' symbol, are used to annotate the code for better understanding. They are ignored by the Python interpreter and are meant for human readers to provide context or explanations about the code.

  • How can you create a multiline string in Python?

    -A multiline string in Python can be created by using triple quotes (either three single quotes or three double quotes) at the beginning and end of the string, allowing the string to span multiple lines.

  • What is the purpose of the plus sign (+) when used with strings in Python?

    -The plus sign (+) is used to concatenate, or join together, two or more strings. It allows you to combine strings end-to-end to form a single string.

  • What is the role of the newline character ('\n') in Python strings?

    -The newline character ('\n') in Python strings is used to insert a line break within the string. It allows text to be displayed on the next line when printed.

  • What is the significance of the asterisk (*) when used with strings in Python?

    -The asterisk (*) is used for repetition in Python. When used with a string, it repeats the string a specified number of times. For example, 'text' * 5 would result in 'texttexttexttexttext'.

  • How does the speaker encourage viewers to engage with the content and support the channel?

    -The speaker encourages viewers to like the video, comment, enable notifications, and subscribe to the channel to support the content and stay updated with future episodes.

  • What is the role of the sponsor 'Itpro.tv' in this Python learning series?

    -'Itpro.tv' is the sponsor of the Python learning series, providing financial support that allows the content to be freely available on YouTube. They offer a variety of IT-related courses, including Python, and provide a discount for viewers using the code 'networkchuck'.

Outlines

00:00

🐍 The Necessity of Learning Python for IT Careers

The script emphasizes the importance of learning Python for those seeking or advancing in IT careers, such as network engineers, cloud engineers, and ethical hackers. The speaker introduces a course aimed at teaching Python from scratch, with the goal of making learners proficient enough to excel in their jobs. The course is sponsored by Itpro.tv, which offers a discount for viewers. The speaker guides viewers to start coding in their browser using a Python lab, highlighting the ease of access to Python and the immediate start to coding without the need for complex setups.

05:01

📝 Understanding Python Basics: Strings and Comments

This paragraph delves into the fundamentals of Python programming, focusing on strings—sequences of characters treated as text—and their representation in Python with quotation marks. The concept of using single or double quotes for strings is discussed, with a preference for consistency and double quotes. The speaker also introduces comments in Python, denoted by the '#' symbol, which allows programmers to leave notes for themselves or others without executing the commented lines of code. The importance of syntax in Python is highlighted through an example that results in a syntax error when quotation marks are omitted, demonstrating the necessity of adhering to Python's syntax rules.

10:05

🔍 Exploring Multiline Strings and String Concatenation

The speaker explores multiline strings in Python, which allow for strings to span multiple lines within the code. This is achieved by delimiting the string with triple quotes. The paragraph also covers string concatenation, where multiple strings are combined into one using the '+' operator. However, the speaker points out a common mistake of forgetting to include spaces between concatenated strings, leading to a lack of separation in the output. The correct approach is demonstrated by adding spaces to the strings before concatenation. Additionally, the newline character (' ') is introduced as a way to control line breaks within strings, allowing for more readable output.

15:06

🚀 Advanced String Operations and Python's Power

The final paragraph showcases Python's capabilities with strings, including the use of the multiplication operator (*) to repeat strings multiple times. The speaker demonstrates this with an example that prints a string multiple times in a single line. The paragraph concludes with a summary of the episode's content, emphasizing the significance of Python in the IT field and hinting at more advanced topics to be covered in future episodes. The speaker encourages viewers to provide feedback and engage with the content, and reminds them of the sponsorship by Itpro.tv, offering a discount for their courses.

Mindmap

Keywords

💡Python

Python is a high-level, interpreted programming language known for its readability and efficiency. It is widely used in various fields, including web development, data analysis, artificial intelligence, and more. In the video, Python is presented as an essential skill for those seeking a career in IT or looking to advance in their current job, as it is a 'defacto standard' in the industry.

💡Information Technology (IT)

Information Technology refers to the use of computers to store, retrieve, transmit, and manipulate data. IT is a broad field that encompasses various aspects of computing and technology. The video emphasizes the importance of Python in IT, suggesting that knowledge of Python can significantly enhance one's career prospects in this domain.

💡Network Engineer

A Network Engineer is a professional who designs, implements, and maintains network systems, including local area networks (LANs), wide area networks (WANs), and intranets. The script mentions Python as a crucial skill for network engineers, indicating its utility in managing and automating network tasks.

💡Cloud Engineer

A Cloud Engineer is responsible for building, deploying, and managing applications in the cloud. The role involves working with cloud services and infrastructure. The video script highlights Python as a necessary tool for cloud engineers, suggesting its role in cloud-based operations and automation.

💡Ethical Hacker

An Ethical Hacker is a cybersecurity professional who uses their skills to identify and fix vulnerabilities in systems to prevent potential breaches. The script implies that Python is a valuable language for ethical hackers, likely due to its versatility and the availability of libraries that can be used for penetration testing and security analysis.

💡Print Function

In Python, the print function is used to display output to the screen. It is a fundamental concept for beginners learning to interact with the computer via Python. The video uses the print function to demonstrate basic Python syntax and to show how to output 'Hello World' and other strings.

💡String

A string in Python is a sequence of characters used to store text. It is one of the most basic data types in Python and is essential for handling text-based data. The video explains the concept of strings, their usage in Python, and how they are represented with quotes.

💡Multiline String

A multiline string, also known as a 'triple-quoted string', allows a string to span multiple lines in Python. This is useful for writing large blocks of text or code within a string. The video demonstrates how to create a multiline string and its application in organizing code for readability.

💡Concatenation

Concatenation in Python refers to the process of joining two or more strings together. The video shows how to concatenate strings using the plus sign (+), which is a fundamental concept when working with text in Python.

💡Comment

In programming, a comment is a piece of code that is ignored by the interpreter and is meant for human readers. Comments are used to explain the code, making it more understandable. The video introduces the concept of comments in Python, using the '#' symbol to denote them, and explains their purpose.

💡Integrated Development Environment (IDE)

An Integrated Development Environment is a software application that provides comprehensive facilities for coding, debugging, and running programs. The video mentions an IDE in the context of Python, highlighting its features like syntax highlighting and error checking, which assist in the coding process.

Highlights

Learning Python is essential for job prospects in IT and for career advancement.

Python is a must-know language for various tech roles, including network engineer, cloud engineer, and ethical hacker.

The speaker emphasizes the 'cool' and 'magic' aspects of Python to motivate learning.

The course aims to teach Python from scratch, with no prerequisites.

Introduces the sponsor, itpro.tv, and offers a discount code for their Python hacking course.

No special setup is needed to start learning Python; any device with a browser will suffice.

Replica is introduced as the tool for coding in the browser, with a free account recommended for saving and editing code.

Demonstrates how to write and run the classic 'Hello, World' program in Python.

Explains the concept of a function in Python, using 'print' as an example.

Introduces the idea of a string in Python and how to identify it with quotation marks.

The importance of consistency in choosing between single and double quotes for strings is highlighted.

Teaches how to print multiple strings and the concept of concatenation.

Discusses the use of comments in code with the '#' symbol for notes and clarification.

Shows how to create multiline strings in Python using triple quotes.

Covers the use of the newline character ('\n') to control line breaks in printed strings.

Demonstrates string multiplication in Python to repeat a string multiple times.

The video concludes with a summary of Python's importance in the IT field and a teaser for future episodes.

Transcripts

play00:00

You need to learn Python right now. Hold up. Why? What,

play00:04

why do you need to learn Python right now? The biggest reason right here,

play00:07

if you want to get a job in it or information technology,

play00:10

or you want to advance in your current job, man,

play00:12

you've got to know Python or at least learn it. Soon. Network engineer, Python,

play00:17

cloud engineer, Python, ethical hacker. You guessed it Python.

play00:22

And honestly, that's my list. That's my one reason.

play00:24

Do you need another reason beyond the fact that Python is just cool and amazing

play00:28

and magic? Nah, probably not. So welcome to episode one of my Python core.

play00:41

Want to teach you everything you need to know to become dangerous and Python.

play00:44

And we're starting from zero. Like I don't know what the junk Python is. Zero.

play00:48

No pre-recs. And by the end of this course,

play00:50

my goal is for you to have the skills,

play00:52

just to be awesome and Python and whatever job you have. So yeah.

play00:58

Get your coffee ready.

play00:59

We're going to learn some Python and also a massive shout out to the sponsor of

play01:02

this entire series and the reason it can be free here on YouTube. It pro TV.

play01:06

If you want to learn anything in it, they are my number one choice there. What?

play01:10

I used to learn stuff. Cloud hacking Linux and yeah, you guessed it.

play01:13

Python like check out this awesome Python hacking course they have.

play01:16

So check them out.

play01:17

Use my link below or code network Chuck and get 30% off forever. All right.

play01:21

Now let's start learning Python. So first, what do you need?

play01:25

What do you need to start? Learning Python? Nothing.

play01:27

You won't need anything to start learning Python with me in this course. Yeah.

play01:30

You can install and run Python on any computer Linux, Mac PC,

play01:34

but we're not going to mess with that because that takes time.

play01:36

And we're going to learn Python right now.

play01:38

I want you to start coding immediately right here in your browser.

play01:41

And that's all it takes it.

play01:42

Computer with a browser or heck even a phone with the browser. Oh, hold on.

play01:46

I take that back. You won't need nothing. You'll need, um, you'll need coffee.

play01:49

That's required just this. But anyways, check that link in the description.

play01:52

You'll get access to my free Python lab through my free membership.

play01:55

So click that link below, get signed up and let's start coding right now.

play01:59

Now you'll know you're in the right place. When you see something like this,

play02:01

this will be our Python environment. Our lab now real quick.

play02:04

I want you to click inside here. Just any line in here. 1, 2, 3, 4, 5, 6,

play02:07

doesn't matter. And just start typing. Oh wait. What's going on here.

play02:11

You are invited to create a free replica account.

play02:14

Replica is the tool we're going to be using to do all of this Python stuff.

play02:16

And if you want to be able to edit your code and save it, come back to it,

play02:19

all kinds of fun stuff. You're going to want that for account again. It's free.

play02:22

Don't worry about it. Just do it real quick. Once you're signed up,

play02:25

they'll come back and things will be great.

play02:26

And once you have an account and you start typing in your editor,

play02:29

it'll give you the option to fork it. Which sounds funny.

play02:32

I know which basically means creating your own version of what I've typed in

play02:35

here. Going click that it's fine. Forking.

play02:38

And now right here in your browser or your phone or whatever you're using,

play02:41

you have a Python lab.

play02:42

So let's not waste any more time right here on line three.

play02:45

Let's just start coding. Just copy what I do real quick.

play02:48

We're going to write some code type in the word, print print,

play02:51

and then type in left, parentheses, quotation, mark.

play02:53

Notice it's filling in stuff for us as we're doing that. So it's like magic.

play02:56

I'm telling you and the type in hello world exclamation point

play03:01

actually let's do a couple of those four or five, six or 10.

play03:04

Cause we're super excited to learn Python and we're triggering lots of coffee.

play03:07

I hope that's your code.

play03:08

We're done going click on the play button up here or the run button and let's

play03:12

watch what happens. Run. Boom. Okay. Hello world.

play03:15

Down here in our Python terminal, we just ran Python code. That's it.

play03:19

We're done. Your code are now. No, let's talk about what we did here.

play03:23

So when we said print, hello world and Python,

play03:26

we gave our computer a set of instructions. We said, Hey computer.

play03:29

I want you to do something for me. I want you to actually say out loud or,

play03:33

and the terminal hello world. And of course he said, okay, I'm doing it.

play03:37

And boom, hello world. We basically made him talk.

play03:39

But we had to tell him in a language he understands, which is why we use Python.

play03:42

Python is a computer programming language.

play03:44

And while this is a simple example at the end of the day,

play03:47

that's pretty much all we're doing. When we're using Python,

play03:49

we're telling our computer what to do in a language. He understands now,

play03:53

as we go further in this course, and we go deeper into Python,

play03:56

we can tell our computer to do more advanced things like, Hey,

play03:59

go hack this other computer or go hack this network.

play04:02

Or we might tell the computer, Hey,

play04:03

can you make this configuration change to all the devices in my network?

play04:06

And it will automate that really?

play04:08

You can do anything with Python and that's what makes it amazing.

play04:11

That's why learning Python is like learning how to do magic.

play04:14

So let's keep learning some magic. Let's take another look at our code here.

play04:17

So this point we know that when we said print, hello world,

play04:19

we told our computer to say hello world,

play04:21

but what's actually going on right here. Let's break that down. So first,

play04:24

what is print? What is that thing doing in Python?

play04:27

This is called a function which we'll cover more on later.

play04:30

Let me show you how to create your own functions. Just no for now it's code.

play04:33

That does stuff. And in our case,

play04:34

the stuff that it did was make the computer talk. And in Python, you know,

play04:38

what's a function. When you see these parentheses right here,

play04:40

open and close without the hello world. It'll look just like this.

play04:43

Now this next thing is a huge concept.

play04:45

The south in between and our function here,

play04:47

that sucker is what's called a string.

play04:49

You are going to use this so much in Python. So just get this in there.

play04:52

Here we go. Coffee break. Who? Yeah, here we go.

play04:56

A string is a sequence of characters or the way I like to think of it.

play05:00

It's just text. So looking at hello world here,

play05:03

we have our characters H as a character E I mean,

play05:06

all of them are w even this space right here in between is itself a character.

play05:11

And when we combine those characters together in Python, it's called a string.

play05:14

Now, how do you know if something is a string in Python? And he guesses,

play05:18

you will always see a string with quotes around just like this.

play05:23

Bam, double quotes also be single quotes.

play05:26

So if it's like a one line from each side too, you get away, boom, boom,

play05:29

just single quotes. That's also a string you can use either or,

play05:32

but my personal preference and what I recommend is to always use double quotes.

play05:36

It's just better, but whatever you pick, just pick it and be consistent.

play05:39

And also, do you remember this got a challenge for you for the next 24 hours?

play05:42

Every time you say string, I want you to quote it.

play05:45

So string string just do it or don't I

play05:50

don't care, but it's a good way to remember.

play05:51

I think let's get back to our lab for a second. Let's try printing more strings.

play05:55

So follow along with meals,

play05:56

print our ones we'll type in print using our print function. And this time,

play05:59

you know, let's go crazy. Let's do a single quote, just single.

play06:02

And we'll say I am iron man. Just like that. Let's go ahead and run that code.

play06:07

I clicking our start button up here. Our run button run and boom.

play06:10

We just coded again. Hello world. I am iron man. Let's keep practicing.

play06:14

Let's do another one. Print. No comma.

play06:17

I am Tony stark. Let's do another one France.

play06:22

Now I have a point to this. Just follow along. No comma.

play06:26

I am now let's print that out. Cool.

play06:30

So we have a lot of print functions, printing some fun stuff all real quick.

play06:33

Just underneath that last print function, let's do this.

play06:37

Do a hashtag hashtag insight bin. We are practicing

play06:43

Python. It's awesome. Now what just happened here? Let's try it out.

play06:48

Let's run the code. Uh, nothing. Nothing,

play06:50

nothing happened or nothing happened differently. Right? New concept time.

play06:54

Notice we also have the same thing up here. The hashtag, Hey,

play06:56

there's nothing here. Wake up. Then we have this.

play06:58

When you see a hashtag or a pound sign, we're telling our computer,

play07:01

don't read this the same for you, buddy. This is for humans only.

play07:05

We're telling our computer to ignore that line in our code.

play07:08

This is called a comment. And it's for us. It's for people. It's for you.

play07:11

As you're coding, you can make notes on what you're doing.

play07:13

That's for the next code,

play07:14

or that comes behind you and tries to make sense of the crap you coded.

play07:17

You can go, oh, that's what he's doing. Cause he made a comment.

play07:19

So whenever you add a pound sign in front of something,

play07:23

that immediately will comment it out or just tell the computer.

play07:26

Don't look at this. It's not for you, buddy. That's really handy. When,

play07:29

for example, I have the print, hello world. Up here.

play07:32

This is code the computer will read and run.

play07:34

But maybe just for this next time I run my code.

play07:36

I don't want that to be included so I can just put a pound sign or hashtag right

play07:40

in front of it. And bam, notice it changed color. It's being ignored.

play07:43

Now you've probably noticed this far, that things change color.

play07:46

When we do cool things in here,

play07:47

this is a Python IDE or an integrated development environment.

play07:51

So it's definitely more than a text editor and it does cool things like that to

play07:54

help us code Python. And a lot of ways, it's like a spellchecker. No,

play07:57

when you're typing in Microsoft word or whatever you're using,

play07:59

if you misspell something, it'll tell you underline it with red,

play08:01

kind of the same thing here with coding.

play08:02

So actually let's try something real quick. So we know that here,

play08:04

when we printed the string, no I am poppy. We know what the string,

play08:09

because there are quotation marks, but what if we remove those?

play08:12

What would happen? Let's try, let's remove them remove the last one.

play08:15

And the first one, it was, first of all, it changed color.

play08:18

And then we try to run it. Watch what happens. Ah,

play08:23

it's your first big, bad red error, syntax error, which you're going to,

play08:28

by the way, get used to cause you're going to see this a lot. And it's fine.

play08:30

If you see it, every programmer sees this.

play08:32

Every person who ever starts writing Python or any kind of code will experience

play08:35

this constantly. And you're one Google away from understanding what this means.

play08:39

Now here it's like saying, Hey,

play08:41

you probably meant to do a string and you didn't and it's invalid syntax.

play08:45

Add those quotations back in their sucker so we can run this code problem

play08:49

solved. So now you know what strings are, but what do you say?

play08:52

We have some more fun with them. Let's cover some string basics. Yeah,

play08:56

let's do this strings basics.

play08:59

So we've got a task force to help us learn these strings basics.

play09:01

Right now we have three print functions in our program. I don't like that.

play09:05

Where I want us to do is get down to only one print function.

play09:08

I want us to print this entire thing with one print function. And not just that.

play09:12

I want it to look just like this. Exactly like this each on its own line.

play09:15

And there are multiple ways to do this.

play09:17

So we're going to learn a few things about strings as we try. Now, first of all,

play09:19

if you already have an idea of how to accomplish this, pause that sucker,

play09:22

pause this video and see what you got. Now. If your first thought was like,

play09:26

Chuck, this is pretty dang easy. Instead of doing three separate strings,

play09:29

let's just write one big string that has all this text inside. It's good.

play09:33

Thought. Let's try that first.

play09:34

I'm gonna comment out all this code so I can keep it here for reference that

play09:37

way. It's not going to be run though. Come down here and start typing away.

play09:41

So we'll do our one and only print function and then our double quotes

play09:47

and I'll type in white text.

play09:48

So now we're using one print function with one string. Let's see what happens.

play09:52

Let's run our code. Right? Okay, cool. We did it, but we didn't do it right?

play09:56

Because I wanted each of these things to be on their own line. Right.

play10:00

We might think, well, this is just text. I know how to add a line in text.

play10:04

You hit enter after the sentence. Right? So there and there,

play10:08

that should do the trick. Right? I am iron man. I'm Tony stark, non poppy.

play10:11

Let's see what happens. Oh, good. Old air.

play10:15

Now you probably noticed immediately that, uh,

play10:18

some things change as we change that Python no longer recognized that this

play10:21

entire thing is string it. As soon as,

play10:25

since we hit enter to add a line break,

play10:27

we were done with the print function and we just did it wrong.

play10:29

There is one really easy way to fix this.

play10:31

You see this right here is just irregular string,

play10:33

but there are things called multi line strings. I'll show you.

play10:38

We're going to add some extra quotes. So I'm going to go up to the top here,

play10:41

right at the beginning of that string. And I'm going to add two more quotes.

play10:47

So now I have three double quotes. I'm going do the same thing at the end.

play10:51

Notice our color did change.

play10:52

So we're back in action there and let's run our code and see what happens.

play10:55

Oh yeah. Look that mission accomplished this. My friends is a multiline string.

play11:01

That's exhausting. Three quotation marks. We'll take care of that for you.

play11:04

And we can do whatever we want inside that string.

play11:07

We can add a bunch of space. Pretty cool.

play11:11

So that's one way to accomplish this in one print function, but that's two.

play11:16

Nah, I'm going to make it harder for you for the next challenge.

play11:19

I don't want you to, to make one big long string. No, no, no, no.

play11:22

I want you to keep these individual strings in one print function again.

play11:26

If you already know how to do this, try it out. Pause the video. If you don't,

play11:29

let's do it right now.

play11:30

So this will start to open your eyes to the magic of strings and Python.

play11:34

So once I've been prints type in my first string, I am iron man.

play11:39

How do I add another string to this print function?

play11:41

One way is to add them together. I'm going to do a space,

play11:46

a plus sign, because that's what you do. When you add things,

play11:48

you use a plus sign. Python is no different. And I'll put in my next string. No,

play11:53

I am Tony. Sark let's go and do the next one space plus, and then no,

play11:58

I am poppy. Now this is a bit magical here.

play12:02

We have our three strings and we're adding them together with the plus

play12:07

side, which puts a whole new spin on word problems.

play12:10

This is commonly referred to is concatenating. Did I spell that right? Yeah.

play12:14

I think so. Concatenate or essentially combining things together.

play12:17

So do you think this will solve our problem? Let's try it out.

play12:19

You probably already guessed. No, but let's go ahead and run it.

play12:22

It's going to have a problem. You're probably not anticipating though.

play12:24

So this is going to be fun. Ready? Let's run it. Okay.

play12:27

It definitely combine them. But do you see something off about this, bro?

play12:31

You did give us spaces between our sentences. That's basically grammar Python.

play12:35

Come on. What is this? This combining them like,

play12:38

you don't know how to speak and the computer doesn't write the computer.

play12:40

Doesn't speak English. Doesn't understand this crap understands Python.

play12:44

And we literally told him to do that. That's our fault. What do I mean,

play12:49

look at this. We said,

play12:50

take this string and combine it with this one as a human we're thinking. Yeah,

play12:53

those are two sentences. Put a space between sentences. The computer's like,

play12:58

um, I don't see the space character there because space is a character.

play13:02

He hasn't seen, he went here and he doesn't see anyone here. So he just assumes,

play13:05

yeah. You want me to add those together?

play13:06

Then I'm going to add those characters together. There is no space character.

play13:09

There is no spoon anyways. So how do you think we fixed that? Glenn,

play13:12

pause the video and try it real quick. It's it's very simple.

play13:14

So don't make it too complex.

play13:16

Just try to fix one of the easiest ways to fix this is by simply adding a space.

play13:20

So like for example, here I am iron man.

play13:22

We can add a space and I forgot my period earlier. So I'll add a period.

play13:25

Just add a space at the end of that string. And when I run that code of Wala,

play13:29

we've got our space character there.

play13:31

Let's do the same thing over here after our second string and our second

play13:34

sentence period space, I'll run that code. Beautiful. It looks better.

play13:38

Doesn't it? Yeah, we did not complete our mission.

play13:40

Remember I wanted each of these sentences or each of these strings on their own

play13:44

line as we did before. So how do we fix this again?

play13:47

If you already know video and try it,

play13:49

let's keep going and easy way to fix this is this handy hack right here,

play13:52

right in the string. I'm going to do a backslash and the letter N and that's it.

play13:57

So notice it is inside my string as part of the string.

play14:01

It's a character. Let's run it and see what happens. Boom and bam. Okay.

play14:05

So it created a new line for us that backslash in end is called a new line

play14:09

indicator character.

play14:10

And it does what we just saw it did and sort of fix the rest of our stuff to

play14:15

make it look great.

play14:16

Let's go and add one more new line character to our second string

play14:21

backslash N AML run that code. Now we did it and that's awesome.

play14:26

But notice, um, it's a little wonky, got a little extra space right here.

play14:29

We may not want, how do we fix that? We'll get the,

play14:32

computer's going to take exactly what you told to do in Python.

play14:34

So notice up here in our second string,

play14:36

we've got the new line indicator and the right after that,

play14:39

we've got the space character, and that's where that guy ended up right there.

play14:43

Sort of fix that. We just simply eliminate that space and run our code.

play14:48

Beautiful. Now,

play14:49

can I show you something that will make a lot of sense right now,

play14:52

but it's super cool. And I just have to show you. Okay. Let's try it out. So,

play14:56

um, let's give it lush space here, type this with me.

play15:01

Print for the CS, for our print function. We're going to print the string.

play15:06

And then right after that,

play15:07

string had a space and asterisk space and

play15:11

type in 100. Now, what do you think is going to happen right here?

play15:16

I'll give you a hint. The Astros right here, Python reads. That is multiply.

play15:20

You ready? Let's run our code and run. Boom, boom, boom.

play15:25

How cool was that right? Talking about word problems. We can do stuff like that.

play15:28

Yes. Python is powerful man. Now to make things cleaner and cooler.

play15:32

What do you say? We add our new line indicator character.

play15:34

Where would we put that to make it all on its own line? Try it out real quick.

play15:39

I'm going to do it here. Backslash in right after poppy.

play15:43

Let's run our code now. Oh, gorgeous. I.

play15:47

Am poppy. I poppy. I am. I am. I am popping poppy.

play15:50

Ooh, we covered a lot today. First we established that. Yeah.

play15:54

You got to learn Python right now because if you want to be in it,

play15:58

that's kind of the standard now. Sure.

play16:00

It doesn't necessarily have to be the Python programming language.

play16:02

It can be something else. But the defacto standard right now,

play16:05

the most popular one out there is Python for it. Professionals.

play16:08

I've been saying it for a long time. Check my previous videos,

play16:11

you got to learn Python. And the best time is always right now. We also covered,

play16:15

Hey, what? The junk is Python. At the way,

play16:17

we talk to our computer to tell him what to do to let them know we're the boss.

play16:21

And then we saw how we could tell him to do a few things like, Hey,

play16:24

talk computer, print this out. We learned the print function.

play16:26

We learn what a string was also multiline strengths.

play16:31

And then we learned some strings basics. And while we covered a lot today,

play16:34

we are just scratching. The surface Python gets so much more fun.

play16:38

And in the coming episodes, just a bunch of mind blowing moments. Anyways,

play16:42

that's all I have for episode one.

play16:44

Let me know what you think in the comments below.

play16:45

Is there anything you want me to do differently, better or less of?

play16:49

I don't know. Let me know.

play16:50

And also don't forget to hack the YouTube algorithm today.

play16:53

Like this video comment, notification bell subscribe.

play16:55

We've got to hack YouTube today. Ethically of course.

play16:59

And of course a massive shout out to the sponsor of this entire series.

play17:02

It pro TV. Again, if you want to learn anything in it,

play17:05

if you want to become an it professional there,

play17:06

the best place to go to learn this stuff. So link below or code network. Chuck,

play17:11

you get 30% off forever anyways. Yeah, I think that's all I have. Uh,

play17:16

keep a lookout for future episodes. They will be coming out here.

play17:21

I'll catch you guys next time.

play17:37

[inaudible].

Rate This

5.0 / 5 (0 votes)

الوسوم ذات الصلة
Python LearningIT TrainingCoding TutorialsBeginner's GuideWeb DevelopmentScripting LanguageCareer AdvancementOnline CourseInteractive LabIT Pro Skills
هل تحتاج إلى تلخيص باللغة الإنجليزية؟