PYTHON BEIGNERS LEVELS CODES
Python tutorial, we're going to take this program to the next level and make it more
interesting. So I'm going to show you how to draw a dog hair. Now as part of
this tutorial you will learn how Python code gets executed and you will also learn
about a few programming terms. So press enter, and
on line 2 write another print statement, so print, open and close parenthesis, add a
quotation, now here you want to draw a dog.
So, add an o, that is the head of our dog, followed by 4 hyphens. So this is the body.
alright, now one more time another print statement with quotations, now we need to
draw the legs. So add a space.
Follow it by 4 vertical bars. So, like this, so here's a little imaginary dot. Now let's
run this program and see what we get. So on the top right corner you should see this
play button, click that, there you go, so we have our name and
right below that we have our imaginary dog. Now what you need to understand here,
is that our python code gets executed line by line
from the top. So earlier I told you about Python interpreter that is the program that
knows how to translate or interpret
our Python code into instructions that a computer can understand. So when we run
this program by clicking this program here,
python interpreter starts executing or running our program line by line from the top.
So first it executes line 1,
then, moves onto line 2, and so on. So this is how python programs get executed.
Now let me show you something cool. Let's add
another print statement, with quotations now in between the quotations, add a star or
an asterisk, like
this. Now after the quotation and before the parenthesis, add a space, once again,
add an asterisk,
space, 10. What is going on here? Well, anywhere we have quotations like here or
here
we're defining a string, a string is a programming term which means a series of
characters so here we have a string, we also have
a string on line 3, as well as line 2 and line 1. Now here, we're multiplying the string
by
number 10. So this is the multiplication operator, just like the multiplication operator
we have in math. So with this piece of code we can
draw 10 asterisks on the terminal, let me show you. So let's run this program one
more time, there you go. So we have 10
asterisks. Now what we have here, this piece of code here, is called an expression.
An expression is a piece of
the code that we put in between parenthesis, so we could evaluate our expressions
Our expression will produce 10 asterisks and then
those asterisks will be printed on the terminal. Now as an exercise you can use
these print statements to draw another shape, you can draw a heart, a
ball, whatever you like. I will see you in the next tutorial. One of the questions I get a
lot on my channel is
How Long It Takes To Learn Python
how long does it take to learn Python and become job ready? Well there is no single
answer. It really depends on you and how much effort and commitment you want to
put
into this. But I would say if you spend 2 hours every day consistently, after about 3
months you should be able to write
, basic python programs, but quite honestly, that doesn't get you a job. In order to get
a job, you need to specialize in one area,
what do you want to use python for? Do you want to build web applications or
desktop applications? Or do you want to use it in machine learning and artificial
intelligence?
So whatever you want to do you need to take additional courses. For example if you
want to become a web developer in addition to learning
Python, you should also learn about html, some css, some JavaScript and Django
which is a popular Python framework
for building web applications. Learning all these things would take you another 6
months, so in total you need 9-12 months to become
job ready. At that point you can get a junior developer job with a salary of about 50-
60 thousand dollars a year. Now as you work more
as you do more Python projects, your resume starts to build and you can ask for
$100,000 a year, or 120,000 dollars
a year, depending on where you are, what company, what geographical area, it
really depends, there is no single answer. So are you excited to
learn Python and get started on this career path? If you are, I would encourage you
to make a commitment and spend 2 hours every day practicing
python. And use the comment box below and let me know why you are learning
Python, what do you want to do with it? What's your dream job? I would love to hear
your story.
Variables
In this Python tutorial, you're going to learn about variables, which are one of the
most fundamental
concepts in programming, they're not specific to Python, they exist in pretty much
every programming language out there. We use variables
to temporarily store data in a computer's memory. Here's an example, let's type price
= 10, when Python
interpreter executes this code, it will allocate some memory, then it will store the
number 10 in that memory, and finally it will attach this
price label in that memory location. As a metahor imagine we have a box. In that
box, we have number 10
and price is the label that we put on the box. Now we can use this label anywhere in
This is a very simplified explanation. So now, let's print price on the terminal. Print,
now this time we're not going to
add quotations, because if we put quotations here, we will see the text price on the
terminal. Now the value of the price variable.
So, put it in quotations, and type price, now, let's run this program one more time,
there you go. So we see 10,
on the terminal. So this is how we define variables, we start with an identifier which is
the name of our variable, then,
an equal sign and finally a value. Now more accurately, when this number 10 is
about to be stored in the memory, first it will
get converted to this binary for presentation. So this number 10, is in the decimal
system which has all the digits from 0 to 9.
Computers don't understand all these digits, they only understand 0s and 1s. So
when we store the number 10 in the computer's memory
first it will get converted to it's binary representation which will be a bunch of 0's and
1's, like 001, 001, whatever
Python tutorial, we're going to take this program to the next level and make it more
interesting. So I'm going to show you how to draw a dog hair. Now as part of
this tutorial you will learn how Python code gets executed and you will also learn
about a few programming terms. So press enter, and
on line 2 write another print statement, so print, open and close parenthesis, add a
quotation, now here you want to draw a dog.
So, add an o, that is the head of our dog, followed by 4 hyphens. So this is the body.
alright, now one more time another print statement with quotations, now we need to
draw the legs. So add a space.
Follow it by 4 vertical bars. So, like this, so here's a little imaginary dot. Now let's
run this program and see what we get. So on the top right corner you should see this
play button, click that, there you go, so we have our name and
right below that we have our imaginary dog. Now what you need to understand here,
is that our python code gets executed line by line
from the top. So earlier I told you about Python interpreter that is the program that
knows how to translate or interpret
our Python code into instructions that a computer can understand. So when we run
this program by clicking this program here,
python interpreter starts executing or running our program line by line from the top.
So first it executes line 1,
then, moves onto line 2, and so on. So this is how python programs get executed.
Now let me show you something cool. Let's add
another print statement, with quotations now in between the quotations, add a star or
an asterisk, like
this. Now after the quotation and before the parenthesis, add a space, once again,
add an asterisk,
space, 10. What is going on here? Well, anywhere we have quotations like here or
here
we're defining a string, a string is a programming term which means a series of
characters so here we have a string, we also have
a string on line 3, as well as line 2 and line 1. Now here, we're multiplying the string
by
number 10. So this is the multiplication operator, just like the multiplication operator
we have in math. So with this piece of code we can
draw 10 asterisks on the terminal, let me show you. So let's run this program one
more time, there you go. So we have 10
asterisks. Now what we have here, this piece of code here, is called an expression.
An expression is a piece of
the code that we put in between parenthesis, so we could evaluate our expressions
Our expression will produce 10 asterisks and then
those asterisks will be printed on the terminal. Now as an exercise you can use
these print statements to draw another shape, you can draw a heart, a
ball, whatever you like. I will see you in the next tutorial. One of the questions I get a
lot on my channel is
How Long It Takes To Learn Python
how long does it take to learn Python and become job ready? Well there is no single
answer. It really depends on you and how much effort and commitment you want to
put
into this. But I would say if you spend 2 hours every day consistently, after about 3
months you should be able to write
, basic python programs, but quite honestly, that doesn't get you a job. In order to get
a job, you need to specialize in one area,
what do you want to use python for? Do you want to build web applications or
desktop applications? Or do you want to use it in machine learning and artificial
intelligence?
So whatever you want to do you need to take additional courses. For example if you
want to become a web developer in addition to learning
Python, you should also learn about html, some css, some JavaScript and Django
which is a popular Python framework
for building web applications. Learning all these things would take you another 6
months, so in total you need 9-12 months to become
job ready. At that point you can get a junior developer job with a salary of about 50-
60 thousand dollars a year. Now as you work more
as you do more Python projects, your resume starts to build and you can ask for
$100,000 a year, or 120,000 dollars
a year, depending on where you are, what company, what geographical area, it
really depends, there is no single answer. So are you excited to
learn Python and get started on this career path? If you are, I would encourage you
to make a commitment and spend 2 hours every day practicing
python. And use the comment box below and let me know why you are learning
Python, what do you want to do with it? What's your dream job? I would love to hear
your story.
Variables
In this Python tutorial, you're going to learn about variables, which are one of the
most fundamental
concepts in programming, they're not specific to Python, they exist in pretty much
every programming language out there. We use variables
to temporarily store data in a computer's memory. Here's an example, let's type price
= 10, when Python
interpreter executes this code, it will allocate some memory, then it will store the
number 10 in that memory, and finally it will attach this
price label in that memory location. As a metahor imagine we have a box. In that
box, we have number 10
and price is the label that we put on the box. Now we can use this label anywhere in
This is a very simplified explanation. So now, let's print price on the terminal. Print,
now this time we're not going to
add quotations, because if we put quotations here, we will see the text price on the
terminal. Now the value of the price variable.
So, put it in quotations, and type price, now, let's run this program one more time,
there you go. So we see 10,
on the terminal. So this is how we define variables, we start with an identifier which is
the name of our variable, then,
an equal sign and finally a value. Now more accurately, when this number 10 is
about to be stored in the memory, first it will
get converted to this binary for presentation. So this number 10, is in the decimal
system which has all the digits from 0 to 9.
Computers don't understand all these digits, they only understand 0s and 1s. So
when we store the number 10 in the computer's memory
first it will get converted to it's binary representation which will be a bunch of 0's and
1's, like 001, 001, whatever