This tutorial introduces Python programming fundamentals, covering the distinction between coding (writing code to solve problems) and programming (the broader process of designing, coding, testing, and maintaining software). The video explains that Python is a high-level, interpreted programming language used in web development, data science, AI/ML, and various other fields. Key topics include: compiler vs interpreter (compiler translates entire code first then executes, while interpreter translates and executes line-by-line); variables as containers for storing values in memory; data types including integers (whole numbers), floats (decimal numbers), complex numbers (real + imaginary), booleans (true/false), and strings (text); and the importance of comments for code documentation. The tutorial also covers Python's advantages (easy to learn, free/open-source, large community, extensive libraries) and disadvantages (slower execution speed, runtime errors).
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Python Tutorial for Beginners | Session 1: Programming vs Coding, Variables, Data Types & More
Added:Hello everyone, welcome to my YouTube channel the blazing sun. I am Yesh Sharma and from today I am starting this Python series for anyone who wants to learn Python in the most efficient way.
So let's get started.
Before we begin with Python, there are two terms programming and coding. So let us understand each one of them.
First is coding.
It is basically writing code.
to solve a problem.
Okay. Now there is another term which is known as programming.
This is basically solving a problem.
by different steps.
First is designing.
Second step is coding.
Third step is testing the code whether it works properly or not.
Fourth one is maintaining the software. See we are writing this code. This coding process is basically writing the code. But why do we code? To make a software. So after testing when we deploy a software to solve a problem now we have to also maintain that software. So last process is maintaining the software Okay. So we have seen that in coding uh we are writing code to solve a problem.
So it is just writing the code but programming it in itself is a bigger domain. We are designing, we are coding, we are testing and we are maintaining the software.
this software is solving some problem in the coding we are just writing to sol writing the code to solve that problem.
So we can say that programming is a subset uh is a supererset while coding is a subset.
Uh how we will draw a diagram for it?
Let us see.
Suppose This box, this whole box is programming.
Then it's subset.
This is coding uh coding is just a small part of programming while programming is a bigger domain. So in this course we are going to learn coding not programming uh because testing, designing and maintainer software are itself a different uh things to learn. Now we are going to learn a specific programming language which is Python.
Okay. So before starting with Python, I want you to understand the types of programming languages there are.
types of programming languages.
So, programming languages were made so that we can communicate with uh the machines, the computer. uh we as humans communicate with each other through a particular language like like Hindi or English or any other language which you speak but we cannot use that particular language to communicate with the computer. So to solve that problem over different years uh over different years many programming languages were made starting with the oldest one the machine language which consisted of zeros and ones the binary numbers uh in the form of zeros and ones. Now today we have highle languages like Python or Java or C++ and so on.
uh these languages are more like our English language which can be used to communi be uh used to establish a communication between humans and machines the computer.
Now let us understand the types of programming languages.
So basically there are you can say mainly three types of programming languages.
First is machine language written in zeros and ones.
Now this was the uh programming language which was the closest one to the to the uh this is the closest language is the machine can understand. So uh it was very fast but the thing about it is it is very hard to understand.
So there are very less people who there are very less people who could understand such a language and yes it was very difficult for us to code in this language. Now another programming language is the assembly language.
Now what is this assembly language? It used some short codes also called nemonics.
Pneumonics.
Uh just a second.
New Monx which are basically the short codes or short forms you can say uh to give the computer some instructions which it can understand such as add move sub.
Yes.
And now one more thing about it was it was because of having some words or short codes which are called pneumonics uh just like English language. It was easier to understand as compared to machine language.
Now this assembly language directly could not be understood by the machine.
So we needed an assembler which converted this machine language into a machine uh assembly language into machine language.
needed an assembler which converted assembly language to machine language.
Now this is because the machines can only understand zeros and ones but we have written the code in the form of these letters add move sub also called as pneumonics.
So the machine cannot understand this.
So we need an uh person in between which can convert this assembly language into machine language which the computer can understand.
Okay. So after the m uh assembly and machine languages now comes the modern era there are uh programming languages became more easier to understand by humans but they became more uh far away from the initial machine language. Now let us talk about those highle languages high level languages.
Now there are some characteristics about this highle languages.
they use English like words.
Uh when you will study Python, you will see that it is so easy and uh it consists of many words which are similar to that of English language.
Now see highle languages are also far away from the machine language. So we need a particular thing in between which can convert this m uh highle language into machine language. So the things are called interpreter uh and there are other things which are called compiler.
In some time we will understand the difference between these two terms interpreter and compiler.
Now the examples between um examples of highle languages are python, C++ and Java.
These are the examples of highle languages.
Uh one more thing to tell you that these machine language and assembly language together uh they are also called low-level languages.
while high level languages are these ones.
Now going forward uh in high level languages we heard two terms interpreter and compiler.
Uh now we will study each one of them.
We will understand both each what each one of them means and how they are different from each other. So starting with compiler compiler.
What it does is it translates The whole code first and then executes the code.
So you can say that when we use a compiler in a particular programming language, it will translate the whole code first and then it will execute the that code. But uh the interpreter is very different from this.
What the interpreter does is it translates the code line by line.
Plus executes that particular line.
Okay. So compiler translates the whole code first and then executes the code.
While interpreter is translating each line of the code line by line and the particular line which has it has translated it is now executing that particular line. So, so let us now understand about Python. What kind of programming language it exe uh it exactly is?
As you know, Python is a high level language which means it uses modern uh you can say modern syntax just like the English language and it is interpreted language.
which basically means that the pi uh code written in Python is translated translated but uh each line is translated one by one and each line is executed one by one. Suppose I uh there are 10 lines of code in Python. So first line will be translated and executed. Second line will be translated then executed. Third line will be translated then executed.
Fourth line will be translated and executed and so on. Now Python consists uh Python supports many different ways in which you can write code.
Uh you can be it can be object- oriented way.
objectoriented way.
The other way is functional way.
And procedure.
Uh you will understand the these terms in the future. uh when we will study object-oriented oriented programming in Python then you will understand what ex exactly the object- oriented way is functional way you will understand and the procedural way in the future you will understand these terms when we will study the functions now let us move on now before studying every any subject We should always think why that particular subject we are studying. Is it exactly uh actually helpful in real world or are we just uh studying that particular subject for just scoring marks in the colleges. So let us understand what exactly uh is the need of Python as a programming language in industries.
So the question is where is Python used?
This is the big question.
So I will tell you one by one where exactly Python is used.
So the first thing is web development.
So uh if you will study web development uh you will hear that in the back end Python is used.
The second one is data science and data analysis.
Now in data science and data analysis there is another programming language known as Ren programming language but still uh Python is dominantly used for data analysis uh which you will study if you take the If you take uh choose a code of data science.
Third one is artificial intelligence and machine learning.
Uh when you study these topics uh sorry these branches of machine learning and artificial intelligence they are the code in these languages. uh the uh in these codes are written in Python.
Uh I want to tell you one thing that in these these both are code edited and there are many Python libraries. Uh what are libraries exactly? You will understand in the future. But there are many Python libraries such as numpy, pandas, mac, plot lib, seaborn and cyclic length.
These are many py uh python lang uh libraries which are used to write the code which works in industries for the data scientist or data analytics uh data analyst roles uh in different companies.
And similarly for uh if you want to become uh AI ML engineer AI engineer or ML engineer so in these roles uh Python is dominantly used.
There are many more uh tools which are used but as a programming language Python is the one which is used the most.
Similarly, while making software, in software development, Python is also used.
It is also used in game game development.
There is a particular library in language uh sorry there's a particular library in programming language Python which is called Pywave.
This particular library in Python is used by different professionals to make games. By using the Python you are uh it is also used the Python programming language is also used in cyber security and ethical hacking.
Python is also used in robotics and IoT that is internet of things.
Internet of things.
Python is also used in cloud cloud computing and devops.
The last but not the least, uh, Python is also used in scientific computing.
Scientific computing.
So from all of this you can see that Python is the most useful programming language because it is used in so many of the job roles.
Uh, Python is like a tool which can be uh used in different situations for development any development such as website development in the back end just like uh uh in the development in the web development in the data science job roles in artificial intelligence and machine learning or in any software development team development be it cloud computing and uh DevOps or be it uh the cyber security field, Python is used everywhere in in some form, it is used everywhere.
Now after understanding that uh where Python is exactly used in these particular MNC's now we will understand the advantages and disadvantages of Python.
So first we will go with advantages.
Advantages of Python.
First and the most uh big uh first and the biggest advantage of Python that you will hear from everyone is that it is very easy to understand, easy to learn and understand.
This is because the syntax of Python as uh going forward in the sessions when you will study Python uh different topics of Python you will see that how much close it is correlated with the words in English. So you will appreciate that how it how easy it is to learn it.
The second thing is uh it is free and opensource.
Now uh the thing is that any programming language is developed by a p particular person or or an organization but it actually depends it's more uh the future developments of that particular programming language or you can say the different uh versions which come of that particular programming language are more but because of the open source and because of the community of developers that work on that particular programming language they give their own suggestions regarding those particular programming language and uh these sessions are programming language.
So the third one is large community.
Python has a very large community of developers. This is why this is why uh Python is advancing in every particular version of it. Like suppose the first version was there now you have 3.14 uh version of Python currently.
Let's say the version is 3.14.
Uh in this particular version you will see and you will see the first version.
Uh this is not the first version. uh when you will see the first version and you will compare uh so when you will compare this particular version the latest version with the first version of Python you will see that with time it is it has become better when the first version was there it had some things to write a code uh those things might be not so proper. Uh but with time when people were using Python uh due to its free and open-source nature, people began seeing that hey this is the thing which should be added in this this is the thing that should be removed in Python. So according to that different versions of Python have start uh have came over time and each version has become better at some extent.
Now the next uh advantage of Python is it uh has a large library support.
As I told you uh above, there are many libraries in Python such as these ones which are used in the data science and data an analysis roles and also in the artificial intelligence and machine learning roles.
Uh similarly there is Pygame library which is used in game development. There are a lot of other libraries as well. uh so because of these libraries it is very easy to write code in Python. You don't have to write everything from the scratch but you can use these pre-written libraries to write a code uh which is more easy to understand and you can do a lot of things in very le less number of lines of code.
Now after these uh advantages of Python we are going to see some of the disadvantages.
this advantages of Python.
The first and the biggest disadvantage that you will hear from uh a lot of developers or any person who writes code uh in different programming languages is it is slow.
Now when you will compare Python with a lot of programming languages such as uh C++, C++, Java or any other programming languages, you will see that in executing a particular lines of code, Python will take a lot more time than compared with any other languages such as C++, Java, The second disadvantage is it gives a lots lots of runtime errors.
Runtime errors are often in Python.
So when you will uh work with Python you will see that you expected something but instead of that you get an error while running that particular code. So what exactly is runtime error we will understand in the future but uh don't worry about that.
uh what happens exactly in Python is that due to its uh built-in nature of converting a particular variable into the nearest data type uh which uh the most suitable data type it gives an error because suppose you want a number 3.14 which is pi but python instead of that converted into uh three or suppose you wanted three or it got converted into 3.00 something like that if you want a particular value but instead of that because of the default nature of Python it got converted into any any other value that can give error and uh that is a problem.
So these were the disadvantages of Python.
Now let us get started with Python.
So before going on in Python uh I will give the links of Python uh downloading Python and uh downloading the VS code the editor code editor which I am going to use in these tutorials.
Uh so you can download them from that.
Now now we are going to write the first code of Python which is printing hello world.
See what exactly is print statement and let us now try to understand.
Now suppose uh you want to display something on the screen.
Yeah. Now you want to uh display the user something on the screen or you want to show some particular value on the screen to the user. We use a particular statement called as print statement.
It is used to display output on users screen or you can say the particular uh monitor of your computer or the screen of your laptop. Now let us write a code. The first code of hello world. Printing the hello world in Python.
So this is the S code.
Uh I am creating a new file in my folder session one and I'm calling it uh I'm giving the file a name such as hello world py made this file and now I'm going to Right? Uh print then these curly braces and within this print uh in within these curly braces I am going to write hello world.
Now I am going to run the program. See this is the button to write any py uh to run any python file.
As you can see, hello world got printed.
So, what is the function of print statement?
It is basically used to print or display the output on the users's screen.
And what is the syntax of print statement? Let us see that.
This is the particular syntax print.
print and then you will give curly braces and in the within the curly braces you will give the value that you want to print. Suppose I want to print some message such as hello world. Uh I will go to my VS code. I will write print. Then within these uh within these quotations, I will write hello world.
Suppose you want to print a particular number such as five. So what you will do is you will write print then curly braces and within it you will write file.
Since I wanted to print a message hello world I used these inverted commas.
Let us run this program.
See five got printed.
So this was our first program in Python.
Now going forward I want to explain you something called comments.
comments.
So what are comments? Uh when you write any code, uh you are not the only person that is working on a particular software. So what actually happens is when you write a code you also want the other person to understand what you have done in that particular code or what was exactly the purpose of that code. So what you do is you add comments so that you can make that another person understand what exactly was the intention of that particular code. So what code is uh what commands do is make it easy for us to understand the purpose or exactly how the code is working which is called functionality.
of the code.
Now in Python there are two types of commands called single line comments which start with hash symbol and multi-line comments which start Right.
These sentence uh now they can there can be uh single inverted commas or there can be a multiple inverted commas.
Okay. So there can be double inverted commas or single inverted commas that both of them are accepted in Python. Let us let me show you how exactly uh comments work. See uh earlier I have added a comment single line command hash print statement used to display or uh print the output of the on the user screen. So this is a single line command and why did I add this? So that anyone in reading my code can exactly understand what was the fun uh what was the purpose or the functionality of this particular print statement. Now if I want to add a multi-line comment, how exactly I will add it? Let us see.
Uh suppose I want to write uh this is a multi line comment.
See, Python will give an error. See, it is saying multi-line is not defined.
This is not defined. Uh, so these words are not defined. So, you cannot just write these words uh like this because it will give an error.
So if you want to leave some text for any other person or developer so that he or she can understand uh the purpose or uh purpose or the functionality of your code you will give comments. If it if the comment is of a single line you will give a hash symbol. Otherwise you can give commas single inverted commas like this or uh just second there was a space or you can give even double inverted commas like this.
See I'm writing this is a multi- line command.
See now I will execute and it will not give any error. It is printing hello world and five. So this is the particular purpose of comment. Now one thing you need to avoid while commenting is please do not comment. Obviously uh what I want to say is that some things are very obvious and can be understood easily. You do not have to comment that thing. Uh like in case in this case I told you uh I have commented this print statement used to display or uh print the output on the user screen. But in future you will see that this is very obvious thing. We everybody every developer knows that the functionality of print statement is this. So you do not have to write very obvious things in your comments because then it will create a lot of comments and your code will become uh difficult to read. So this is the negative thing which you have to avoid because the comments should be helpful not uh not problemat problematic in their own. So going forward now let us understand other topics.
Now we are going to study something called as variables.
variables.
What exactly variables are? Uh they are containers or you can say kind of boxes to store values.
What I basically mean is uh suppose you have a value five. You want to use a particular value in the whole program.
Now to carry that value and store it you will assign that value into a variable such as x y z or any uh name of the variable that you want. Suppose let me give an example.
X = 5 or you can say marks is equals to 90.
So if you want to store this particular value 90 or five in your program and you want to use that value in the future, you can store it into the variables such as marks or X. Now where are these variables stored? they are stored in the memory of your particular device uh such as RAM, CPU and so on.
They are stored basically on RAM uh while you are executing the program they are stored in your RAM. Now uh let me show you how to create variables.
Okay.
So my first variable will be uh let's suppose I want to store marks of a person. Marks is equals to 90.
Suppose I want to store age of a person.
age is equals to 15.
Suppose I want to store the name of a person. Name is equals to yes.
Uh suppose I want to store a value such as true or false. So you can even store that.
uh you can say truth is equals to true. So you can store any kind of value which is possible in a programming language in the containers such as marks, age, name, truth or any uh particular name or which you like into containers which are called variables.
Now there are some rules to write.
Now there are some rules to write the names of these variables and you cannot write anything in these uh in the as these variables. Let me explain. Um there are some rules which are followed when writing the name of these variables. The first rule is names of variables should not start with what I basically means it uh let me explain you. Suppose I give a variable such as one answer.
Now this is not a valid name because according to the first rule the names of variables should not start with a digit.
Means when you are writing the name of variable uh the first character of that particular variable name uh should not be a digit like see one has come in the beginning of this variable name.
So this is an invalid name and this will result in an error when you are writing some code in Python. Now there's another rule that you can use only underscore as a symbol in a variables name.
So underscore is a symbol which can be used as a variable's name. For example, uh suppose I want to give marks of first student. So I will say marks of first student. So 1 is equals to 90.
So this is valid. But if I use any other symbol in this variable such as marks and suppose I say add the rate 1 is equals to 90. This is wrong because any other symbol other than underscore in the variable's name is not allowed.
Now the third rule is we cannot use reserved keywords as variables variable name.
Let let me explain. See age is equals to 40 is a valid name because new there is no such reserved keyword uh such as age in Python programming language. What exactly are reserved keywords? They are basically words which have a particular fixed uh meaning which the interpreter will understand in the Python language.
So if you will give that particular name uh that reserved keyword as a variable name. So the interpreter will kind of get confused whether you want to use that particular word uh uh as a sense in which it is defined in that programming language or are you using it as a reserved keyword. So this is avoided as it will give an error. Now what I mean to say is if you'll say true is equals to 40. Now this will give an error because true is a reserved keyword in Python programming language. So this will give an error. Let me show you by writing the code what I exactly mean.
Okay. So let me write uh the variables names. See the first condition was names of variables should not start with digits. Let us see if if I give a variable name which start with digits. I say uh one name. See from the beginning it has started uh giving a red symbol.
Uh the color has changed to red because it is not correct. Is equals true to yes.
And let me run this program. It will give an error. See it is saying syntax error because you know that the variable's name cannot start with a number.
Now let me comment this.
This is but what if I give the name as name 1 is equals to yes.
Now let me just show you by printing the name one.
See it got printed.
This is because it is a valid name. Uh even if I will not print it and I will run this program.
See it is not giving in any error.
This means this is a valid name.
This is a valid variable name.
Now the second condition was only unders underscore uh as a symbol in variable's name. Let me show you. Suppose I use name or I say age at the rate two equals to 10. Now I will run this program.
It will give a syntax error. Cannot assign to express expression. See this is because you cannot use any other symbol other than underscore to declare the variable's name. So this is wrong.
Now instead if I will use uh the variable name as age_2 is equals to 10 and I will run the program. It will not give any error. See it will not give any error.
Now the third condition that I told you was cannot use reserved keywords.
Uh the I told you that true is a reserved keyword in Python. If I say true is equals to 10 and I'll run this program.
It will give an error. Cannot assign to true because true itself is a keyword.
Now instead of it I give you a particular keyword uh particular variable name which is not a keyword. See this was wrong. Uh I create a new variable such as uh let us say count is equals to 10. Now count is not a keyword in Python. So this will not give you any error error. See it did not give any error.
So this is a valid variable name.
Now let us also see what if I start the name of a particular variable with underscore. I say underscore age is equals to 10.
Now let me run this.
It was okay. But there is one thing this is not followed in Python because uh this is not never encouraged and mostly we use underscore later a= underscore 1 is equals to 10.
Uh this is because see you will see that many uh when you will study object- oriented programming underscore before the uh variable name has a different characteristic or explanation of a variable uh as its own may uh means underscore underscore before the name of a variable has a different meaning and that meaning uh is used in object- oriented programming. So when you will uh understand object-oriented programming until then we will not never use anything such as this. We will we can use underscore uh in between the variable name but we will not never start or end the variable with an underscore.
Okay.
Now I will teach you uh what are the data types in Python.
So let us see.
data types in Python.
So what are data types? They are basically the kind of value uh which are stored in variables. Uh let me explain this one by one. So there can be numeric data type and there can be numeric data uh numeric data types uh such as integer float and complex.
Let us see each one of them. Integer or int.
These are basically uh not whole numbers just a these are integers.
with no decimal values.
You can say they are whole numbers uh along with whole numbers uh integers are also negative. Let me give an example.
suppose - 10 0 4 and so on. So these are inteious.
Now what are float?
Float are decimal numbers.
Numbers which have decimal places as well. Let me give give an example.
Suppose - 10.01 01 uh 3.14 and so on.
And what are complex? What is complex data type? Uh complex are basically a combination of real numbers plus imaginary numbers.
Let me give an example. So in Python, see in maths you have learned that uh complex numbers are of the form a plus i where a is the uh real part and b is the imaginary part. Similarly uh in python instead of i, we are using the symbol j to represent iota. Let me explain this. Uh examples are 3 + 4 J - 10 + 2 J 5 - 4 J and so on. Uh so there are is a real part and there is an imaginary part as well.
The most commonly used numeric data types are integer and because some someday you might need it as well.
Now the next data type is boolean data type.
So uh boolean data types consist of only two values true and false.
Uh what is true? It means uh whether a condition is true or false.
Just a second.
So you will uh learn that in programming language also there are conditions.
So true is used if a condition is true or you can say correct or it is valid and false is used if the particular fact or condition is wrong.
Uh we will learn more about boolean data types true and false in the future when we will study uh different operators.
Uh so moving on the next data type is string.
So what exactly string is uh when just a second see I stored my name as yash in a variable called name.
Uh in these inverted commas um anything such as which is a kind of text or consisting of digits or uh not digits sorry uh instead of digits you have English characters uh alphabets uh along with either symbols or a combination of them you can say that they are string. Let me show you what is exactly is a string. So it is text data type.
Let me give an example.
So you can say in inverted commas if I say write hello world or in inverted commas anything in inverted commas is string. Uh no no no matter what is inside this these inverted commas everything is string. Uh suppose I say uh address 1 2 3 or suppose I say uh suppose I say cost at the rate 20 and so on. Anything which is inside these inverted commas is string.
Now you know that you have a particular email address. It consists of uh alphabets both in upper case and lower case. Uh it will also have some symbols.
It was also have some uh digits. So the best example of a string is your email address itself.
Now there are also other data strip in the future but these are the ones which we will use the most for now. Uh any other data type which we will need in the future uh I will teach you.
Now moving on, we will see some terms such as expressions and statements.
Now first let us know what is our expressions. So any uh any particular value or you can say uh if you write anything in the form of uh in the form such as let me explain you uh let me give you an example three uh into 4 or you say 3 + 9 or You can say uh a + b minus c. So any particular thing written in this format is an expression.
And what basically is a statement? It is assigning this particular expression to a variable. Suppose I say product is equals to 3 into 4 sum is equals to 3 + 9 or I say result is equals to a + b minus c. So these are statements while these are expressions.
So you can say that expressions are a particular uh you can say a part of a equation while the whole equation along with the variable name when we are assigning that particular in uh expression into a variable is a statement. Now statements do not always need to be equal having an equal to any particular uh Python line can also be a statement.
Let me explain. So suppose I say uh just uh I wrote print hello world.
This is also a statement.
uh a particular line in the code of Python is also a statement while expressions are just raw part of the statement which are not assigned to any variable. So these are expressions and while these are statements.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23