0:00
Welcome to the next chapter that is data types. So I'll be explaining different data types in Python program
0:09
So basically data type of data present a type of data present inside a variable. So what type of data is there
0:16
in variable that will be given by a data type. And also in Python as you might have seen
0:22
I have given an example of a is equal to 10 in first slide where I did not write specifically which type of identity
0:29
Identifier or variable I am defining. So I know this is an integer, but in another programming language I need to specifically
0:36
say integer A, right, or character or string B or load C, right
0:43
But inside Python, we do not need to do that specifically and that is a reason it is dynamically
0:50
type language. So before moving forward, I would like to see your attention on different type of inbuilt functions
0:59
like type is one of the function so whenever you are seeing type of a it will tell you that
1:06
it is an integer whenever you are saying type of b if at all it is having certain string
1:11
values it will tell you this is a string ID will give you an object so whenever you are coiling an idea of A it will give you what exact location that particular variable is stored inside a memory and print function that we already seen
1:27
So whatever you are defining inside a print function in double quotes, it will give you an output. Right
1:34
So these different inbuilt data types in Python like integer, complex, float, volume and so on until list double set and dictionaries
1:43
and even none. So we'll see all those in Jupiter notebook. Before that I would like to highlight you another detail of type casting
1:52
What is type casting is? This is an important interview question that will be asked inside your Python coding
1:59
So whenever you wanted to convert one data type into another, you have, you can directly
2:04
do it by in typecasting. How it works? So for example, I have E is equal to 10
2:10
So I know by default using dynamically type, it is a different. is integer right but now i wanted to convert this a into string so how i will do i will do
2:21
styr of a right so whenever i will be doing this so it will print 10 but in words so that will
2:32
be an output as a string what you did you converted integer into string by typecasting and using the default function of STR so there are different inbuilt functions in typecasting that we can
2:43
use that are IMT float complex bullion and STR so we will see those examples one by one
2:50
these three functions we are already seen for example if this is a float and you're
2:57
converting into integer this is we and you're converting into integer this is we and you're converting into
3:01
integer this is integer converting to float this is integer converting to complex number
3:08
integer converting to bullion and float converting to string so this is the output of it
3:14
whenever you're converting this load into integer it will give just integer similar v for others
3:20
right this is the way you can do typecasting examples inside our jopeter notebook so
3:27
i have taken different variable or identifiers and i have given different values and i have given different values
3:31
values so a has integer b has strings C has float D has bullion this is the
3:39
list double dictionary and complete so if at all you are not aware about list
3:45
double dictionary we'll be seeing them in upcoming sessions so whenever I am
3:50
completing this operation using shift enter it will tell me what type of particular identifier that which you have defined is We did not specifically define
4:02
So Python on inbuilt it will tell what that particular variable is all about
4:07
So that's why it is dynamically tagged. So whenever you wanted to see where exactly this is stored, you can just check it with ID
4:15
So it will tell you okay in this particular system at this location this is stored
4:22
So there are two types of memories that we have already that is one is if memory and
4:28
is stack memory so whenever you are defining a variable so whenever you are seeing
4:35
a equal to 10 a will be stored to stack which will be referring to the value which is
4:43
stored in if memory right so this is globally accessible and this is limited to the
4:49
scope that is define so this is certain types of memories that we deal about whenever you are classify or you finding any object
4:57
classes or functions inside Python. So moving back to the typecasting, whenever all these examples which I have shown you
5:07
it will be converting those to the specified numbers. And that is it about our chapter data types
5:14
Thank you. See you in the next chapter