WEBVTT

00:00.140 --> 00:00.710
Hello guys.

00:00.710 --> 00:03.110
So we are going to continue the discussion with respect to Python.

00:03.110 --> 00:06.380
And in this video we are going to discuss about variables okay.

00:06.410 --> 00:08.030
Now what exactly is variables.

00:08.030 --> 00:10.730
And here I have also given the entire video outline.

00:10.730 --> 00:15.560
So we will first of all introduce or like the topic is introduction to variables.

00:15.560 --> 00:18.230
Then we'll be seeing how we can declare and assign variables.

00:18.230 --> 00:20.180
Then we'll talk about the naming convention.

00:20.180 --> 00:21.890
Then we'll understand variable type.

00:21.920 --> 00:24.620
We'll see type checking and conversion dynamic typing.

00:24.620 --> 00:28.220
And finally we'll be seeing a lot of practical examples and common errors okay.

00:28.250 --> 00:31.700
So all these things will be specifically covered in this video okay.

00:31.730 --> 00:34.700
Now first of all as usual let's go with the definition.

00:34.700 --> 00:39.470
So variables are fundamental elements in programming used to store data that can be referenced and manipulated

00:39.470 --> 00:40.310
in a program.

00:40.310 --> 00:46.730
In Python, variables are created when you assign a value to them, and they do not need explicit declaration

00:46.730 --> 00:48.410
to resolve memory space.

00:48.410 --> 00:52.310
The declaration happens automatically when you assign a value to a variable.

00:52.340 --> 00:57.530
Okay, so the best way to give you an example is that let's say if I define a is equal to 100.

00:57.530 --> 00:59.240
So this basically becomes the variable.

00:59.240 --> 01:04.100
And always remember guys whenever you start a new notebook file, always make sure to select the kernel.

01:04.130 --> 01:04.520
Okay.

01:04.550 --> 01:06.410
Now if I'm going to write a is equal to 100.

01:06.440 --> 01:10.790
This basically means that I've created a variable a and I've assigned a value to 100.

01:10.820 --> 01:11.390
Okay.

01:11.570 --> 01:16.700
Now uh, obviously in my previous video I've also defined some basic variables and all and I've assigned

01:16.700 --> 01:21.470
some values, let's say string, numerical uh, integers, floating point, anything, any values you

01:21.470 --> 01:22.820
can basically assign.

01:23.180 --> 01:24.680
Uh, we'll be learning more about it.

01:24.710 --> 01:34.340
Uh, so first of all, let's go ahead and understanding about declaring, declaring and assigning variables

01:34.370 --> 01:34.970
okay.

01:35.360 --> 01:40.100
So here you'll be able to see that uh, let's say I'm going to define age is equal to 32.

01:40.130 --> 01:45.530
I'm going to probably define height is equal to six feet or 6.1.

01:45.560 --> 01:47.060
That is specifically my height.

01:47.060 --> 01:48.110
So I'm writing it down.

01:48.110 --> 01:49.670
So height is equal to 6.1.

01:49.700 --> 01:53.840
Then let's say name is equal to my name I will go ahead and define crush.

01:54.170 --> 01:58.760
Uh and then here you can also see that I can also define a Boolean variable.

01:58.760 --> 02:02.230
Let's say I will go ahead and define is underscore student.

02:02.260 --> 02:02.620
Okay.

02:02.650 --> 02:04.690
I will also talk about naming convention.

02:04.780 --> 02:07.090
What is the best naming convention of defining a variable.

02:07.090 --> 02:08.350
What are the good practices.

02:08.350 --> 02:09.790
Everything I'll be discussing about.

02:09.790 --> 02:12.910
So let's say I'm going to define a boolean variable as true right.

02:12.940 --> 02:15.730
We'll learn more about the specific data types in my next video.

02:15.730 --> 02:17.710
But here I'm just giving you an example okay.

02:17.740 --> 02:19.030
So h is equal to 32.

02:19.060 --> 02:19.990
This this is there.

02:19.990 --> 02:21.940
And I have actually written it right now.

02:21.940 --> 02:24.010
Let me quickly go ahead and print it.

02:24.010 --> 02:26.290
And this is how we assign a variable right.

02:26.320 --> 02:29.260
We are declaring a variable and assigning some values right.

02:29.260 --> 02:34.330
So now let me just go ahead and print printing the variables.

02:34.330 --> 02:34.810
Right.

02:34.810 --> 02:36.220
So here you can see.

02:36.220 --> 02:39.790
So now first of all I'm going to print H right.

02:39.790 --> 02:45.730
And this is where I will also show you how you can use different print, how you can display in your

02:45.730 --> 02:46.720
console in a different way.

02:46.720 --> 02:52.480
So first of all let's say I want to print h so h colon let's say I want to assign this h colon with

02:52.480 --> 02:53.440
some value over here.

02:53.440 --> 02:55.690
So I will go ahead and define my variable h right.

02:55.720 --> 03:01.000
Similarly, if I go ahead and show you the next print statement here, I'm going to basically write

03:01.030 --> 03:01.960
height.

03:01.990 --> 03:02.530
Okay.

03:02.530 --> 03:06.070
And with respect to this particular height I am going to define another variable.

03:06.070 --> 03:08.140
Let's say this will basically be my height.

03:08.320 --> 03:12.220
Another next thing that I'm going to print over here is my name.

03:12.250 --> 03:17.080
And here you can probably see that I'm going to basically define my name.

03:17.080 --> 03:19.060
And let me just go ahead and write comma.

03:19.060 --> 03:20.770
And this will basically be my name.

03:20.800 --> 03:21.220
Right.

03:21.250 --> 03:25.600
So if I want to define all these things you here, you can see I'm displaying age is equal to 32.

03:25.630 --> 03:26.980
Height is equal to 6.1.

03:27.010 --> 03:28.000
Name is equal to crush.

03:28.030 --> 03:32.530
That basically means see when I'm printing I can also call this particular variable that I have actually

03:32.530 --> 03:33.490
defined okay.

03:33.550 --> 03:35.140
So these are some of the ways.

03:35.170 --> 03:40.630
Again we will be discussing about more different boolean type more different data types as we go ahead.

03:40.630 --> 03:43.210
And that is how we declare different different variables.

03:43.210 --> 03:47.020
But just a basic idea for you with respect to the variable declaration.

03:47.050 --> 03:47.560
Okay.

03:47.920 --> 03:51.190
Now coming to the next one, which is basically called as naming convention.

03:51.190 --> 03:52.810
And this is the most important one.

03:52.810 --> 03:55.000
Like how should we name a variable.

03:55.030 --> 03:55.600
Right.

03:56.050 --> 03:59.020
And for this you really need to know about the naming convention.

03:59.770 --> 04:03.370
Some of the important points that I would like to mention over here.

04:03.400 --> 04:06.370
Let's say a variable's name, right?

04:06.400 --> 04:14.620
The variable name that we define right should be should be descriptive.

04:15.130 --> 04:15.700
Okay.

04:15.760 --> 04:24.610
Then uh, the second point that I would like to mention they must always start with a letter.

04:24.640 --> 04:24.880
Okay.

04:24.910 --> 04:26.350
So this is the second condition.

04:26.380 --> 04:29.260
Or it can also start with an underscore.

04:29.290 --> 04:29.740
Okay.

04:29.770 --> 04:33.190
Underscore like underscore uh this kind of underscore mark.

04:33.190 --> 04:33.730
Right.

04:33.760 --> 04:42.820
And uh, it can contain letters numbers and underscore in between.

04:42.820 --> 04:43.450
Right.

04:43.900 --> 04:44.680
In between.

04:44.680 --> 04:49.240
But always understand they must always start with a letter or underscore.

04:49.240 --> 04:52.540
And it can contain letters, numbers and underscores.

04:52.570 --> 04:52.750
Okay.

04:52.780 --> 04:54.340
Within inside that okay.

04:55.540 --> 04:57.010
And uh, one more thing.

04:57.010 --> 04:59.390
Very important point, which I have already mentioned.

04:59.390 --> 05:04.580
Variables names are case sensitive.

05:05.120 --> 05:05.660
Okay.

05:05.690 --> 05:06.950
This also I have defined it.

05:06.950 --> 05:08.660
So these are some of the naming important.

05:08.690 --> 05:10.700
Naming convention with respect to the variables.

05:10.730 --> 05:11.210
Okay.

05:11.240 --> 05:13.610
Now let's see some kind of example over here.

05:13.640 --> 05:17.690
So first of all I will just go ahead and write some valid variable name.

05:17.720 --> 05:17.960
Okay.

05:17.990 --> 05:20.210
So valid variable names.

05:20.210 --> 05:25.790
So first valid variable name I'm going to define it as first underscore name is equal to crush.

05:25.820 --> 05:26.450
Okay.

05:26.780 --> 05:30.560
Uh last underscore name is equal to Nayak.

05:30.560 --> 05:30.860
Right.

05:30.860 --> 05:34.190
So is this a good way of writing a variable.

05:34.190 --> 05:34.640
Yes.

05:34.670 --> 05:35.960
Does it start with a letter?

05:35.990 --> 05:36.410
Yes.

05:36.410 --> 05:37.640
It starts with a letter.

05:37.670 --> 05:41.630
Does can it contain letter number or numbers or underscores?

05:41.660 --> 05:42.560
Yes, it can contain.

05:42.560 --> 05:45.560
So here you can see I am having letters or underscore.

05:45.590 --> 05:49.040
I can also put numbers in between but not in the starting right.

05:49.070 --> 05:51.770
So this is a good way of defining a variable.

05:51.800 --> 05:52.220
Okay.

05:52.220 --> 05:55.100
So here uh this absolutely works fine.

05:55.160 --> 05:58.670
Let me say show you some invalid variable name.

05:59.940 --> 06:01.740
Invalid variable names.

06:01.770 --> 06:02.310
Okay.

06:02.730 --> 06:05.610
So let's say that I define with a number.

06:05.640 --> 06:05.910
Right.

06:05.910 --> 06:08.430
And if I go ahead and define over here age is equal to 30.

06:08.460 --> 06:11.760
See I'm getting an error saying that invalid decimal literal right.

06:11.790 --> 06:13.290
So I cannot start with a letter.

06:13.290 --> 06:14.880
So this is one way okay.

06:15.030 --> 06:20.370
The another way is that, uh can I define something like this first dash name.

06:20.520 --> 06:21.030
Right.

06:21.060 --> 06:24.930
Can I define like this first dash name is equal to, let's say Krish.

06:25.440 --> 06:26.490
Can I define like this?

06:26.520 --> 06:27.480
Will I get an error?

06:27.480 --> 06:30.720
So here you can see cannot assign to expression here.

06:30.720 --> 06:34.380
Maybe you mean double equal to or instead of equal to.

06:34.410 --> 06:36.060
So this is not being considered.

06:36.060 --> 06:38.160
This symbol is also not being used.

06:38.160 --> 06:38.760
Right.

06:39.510 --> 06:43.080
Uh so obviously this is also an invalid variable name.

06:43.110 --> 06:43.770
Right.

06:43.800 --> 06:48.540
The third invalid variable name can I use at the rate and define a name variable.

06:48.570 --> 06:49.080
Right.

06:49.080 --> 06:51.210
So let me just go ahead and check it out.

06:51.210 --> 06:53.400
So here I'll just go ahead and write Krish.

06:53.430 --> 06:54.570
Will I get an error.

06:54.570 --> 06:55.950
It says invalid syntax.

06:55.950 --> 06:57.540
Maybe you meant so and so right.

06:57.540 --> 07:00.990
So this is also not a valid variable name.

07:00.990 --> 07:02.610
It is an invalid variable name.

07:02.640 --> 07:03.120
Okay.

07:03.120 --> 07:07.560
And already I have spoken about case sensitive right.

07:07.590 --> 07:08.850
Case sensitivity.

07:08.880 --> 07:09.390
Right.

07:09.420 --> 07:17.970
If I define name is equal to Krish and let's say I have defined capital name is equal to Nayak.

07:17.970 --> 07:18.420
Right.

07:18.450 --> 07:20.940
Both these are different right.

07:20.940 --> 07:21.990
It is not same.

07:22.020 --> 07:22.290
Right.

07:22.320 --> 07:27.120
If I really want to compare, can I compare like this number name double equal to capital name.

07:27.210 --> 07:29.040
It will be giving false right?

07:29.040 --> 07:29.430
Yes.

07:29.430 --> 07:30.000
The values.

07:30.000 --> 07:31.530
If it is same it will give me true.

07:31.530 --> 07:35.940
But in short you can see that these are different identifiers, right?

07:36.090 --> 07:38.790
Later on I can do the comparison operation and I can do it right.

07:38.790 --> 07:41.310
So obviously case sensitivity is also there right.

07:41.340 --> 07:45.900
So this was related to something related to the naming conventions okay.

07:45.930 --> 07:51.690
Now let me just go ahead and make you understand about some of the variable types okay.

07:51.690 --> 07:55.440
So we will continue the writing the code here itself.

07:55.440 --> 08:01.410
So let me just go ahead and write Understanding variable types.

08:01.620 --> 08:08.910
Okay, now one thing you need to understand Python is dynamically typed okay.

08:09.060 --> 08:11.400
Dynamically typed.

08:12.480 --> 08:13.710
What does this mean?

08:13.710 --> 08:16.590
This means the type of a variable.

08:17.370 --> 08:25.110
Type of a variable is determined at runtime and determined at runtime.

08:25.140 --> 08:25.680
Right.

08:25.710 --> 08:27.990
So this is very much important okay.

08:28.020 --> 08:32.700
And some of the important data types are like int float string and boolean right.

08:32.730 --> 08:35.790
So let's say if I write e is equal to 25 right.

08:36.030 --> 08:40.080
So when I execute it during the runtime it will understand.

08:40.110 --> 08:40.830
Hey fine.

08:40.830 --> 08:42.240
Integer is basically getting assigned.

08:42.270 --> 08:44.460
So age is an integer variable right.

08:44.490 --> 08:48.900
And let's say that I will go ahead and define some more variables right.

08:48.930 --> 08:50.760
Let's say height right.

08:50.790 --> 08:52.860
I'm going to basically go ahead and define height.

08:52.860 --> 08:54.600
Let's say I'm going to write 6.1.

08:54.600 --> 08:57.720
So this this is nothing but it is integer.

08:57.750 --> 08:59.940
This is nothing, but this is float.

08:59.970 --> 09:02.220
See how I'm also using the single line comments?

09:02.220 --> 09:02.700
Right?

09:02.730 --> 09:05.190
Let's say if I'm going to define my name.

09:05.190 --> 09:06.630
So this will basically be Chris.

09:06.630 --> 09:10.380
So this is what this is nothing but str the string.

09:10.380 --> 09:12.960
And finally if I go ahead and define is underscore student.

09:12.960 --> 09:15.180
This is basically my boolean variable right.

09:15.180 --> 09:18.120
So boolean or sorry I will assign it as true.

09:18.120 --> 09:20.490
So this basically becomes my boolean variable.

09:20.520 --> 09:26.520
Now if I go ahead and print the type of any of this right like age.

09:26.520 --> 09:28.110
So I'm going to basically get integer.

09:28.110 --> 09:29.010
The class will be integer.

09:29.040 --> 09:29.700
During the runtime.

09:29.700 --> 09:30.930
It is able to understand it.

09:30.930 --> 09:35.760
If I go ahead and print what is the type of name I'm actually going to get string right.

09:35.790 --> 09:40.980
So similarly you will be able to find out different different types like what classes it basically belongs

09:40.980 --> 09:41.340
to.

09:41.370 --> 09:41.880
Okay.

09:42.240 --> 09:44.790
Now one more thing.

09:44.820 --> 09:50.190
Right here I will discuss about one very important point and understand one thing guys.

09:50.190 --> 09:51.840
Here I'll be showing some example.

09:51.870 --> 09:58.580
But when I go ahead with more session or more different lessons as we go ahead, right, I will be reusing

09:58.580 --> 09:59.270
all these things.

09:59.270 --> 10:04.280
Don't think that I'm just going to write for a single time over here, because this is all things will

10:04.280 --> 10:05.270
again get repeated.

10:05.300 --> 10:07.610
Okay, with all the different, different examples.

10:07.640 --> 10:11.990
Now let me just go ahead and make you understand about type checking and conversion.

10:12.020 --> 10:12.530
Okay.

10:12.680 --> 10:14.390
Now type checking and conversion.

10:14.390 --> 10:15.530
What does this basically mean.

10:15.560 --> 10:16.430
Obviously type checking.

10:16.430 --> 10:17.210
You have known right.

10:17.210 --> 10:19.820
So if I go ahead and write type of height.

10:19.850 --> 10:24.200
So that basically means I'm going to get the uh data type of this height variable.

10:24.230 --> 10:24.440
Right.

10:24.470 --> 10:28.040
So in short I'm actually getting float over here right now.

10:28.070 --> 10:29.390
My question rises.

10:29.390 --> 10:32.540
Can we convert one data type to the other data type.

10:32.630 --> 10:33.350
Is it possible.

10:33.350 --> 10:34.730
So let me just go and show you.

10:34.760 --> 10:38.120
Let's say if I go ahead and write age is equal to 25 right now.

10:38.120 --> 10:44.090
You know that if I go ahead and write print type of age, so what I'm actually going to get it is an

10:44.090 --> 10:45.350
integer, right?

10:45.350 --> 10:48.680
But now I am going to perform some type conversion.

10:48.680 --> 10:53.000
Type conversion basically means I am going to convert this integer value into a string value.

10:53.030 --> 10:53.660
Let's say.

10:53.690 --> 10:59.030
So if I go ahead and write age, underscore str, and if I go and use this str function.

10:59.060 --> 10:59.570
Right.

10:59.720 --> 11:00.500
STR function is.

11:00.500 --> 11:00.710
What?

11:00.740 --> 11:01.100
String.

11:01.100 --> 11:01.370
Right.

11:01.400 --> 11:03.860
This is what is the class that I'm actually getting.

11:03.890 --> 11:07.460
Now if I want to convert this age into string I can use this str.

11:07.460 --> 11:09.320
And I can use this age variable over here.

11:09.350 --> 11:09.770
Right.

11:09.800 --> 11:12.740
Now if I go ahead and write print age.

11:13.100 --> 11:14.450
Print age.

11:14.480 --> 11:16.550
Underscore str okay.

11:16.580 --> 11:22.970
And after that I will just go ahead and write print type of age underscore str right.

11:23.000 --> 11:24.410
So if I go ahead and execute it.

11:24.440 --> 11:30.950
See initially it was int later on when I printed this age underscore str here you can probably see that

11:30.950 --> 11:32.090
I'm getting 25.

11:32.120 --> 11:32.660
Okay.

11:32.780 --> 11:35.540
But the type of this particular value is string.

11:35.570 --> 11:37.340
Right here you can see string.

11:37.340 --> 11:41.690
So this this value from integer it has got converted into strings okay.

11:41.840 --> 11:44.030
Now the question rises Chris.

11:44.030 --> 11:47.060
Uh what are the different types of type conversion can I do.

11:47.090 --> 11:47.630
Okay.

11:47.780 --> 11:49.610
Can can I do something like this.

11:49.610 --> 11:50.390
Can I write.

11:50.420 --> 11:52.760
Age is equal to in string like 25.

11:52.790 --> 11:55.010
And can I convert this into int.

11:55.130 --> 11:56.210
Let's see.

11:56.540 --> 11:56.840
Right.

11:56.870 --> 11:57.950
Let's see this.

11:57.980 --> 11:59.240
So the answer is yes.

11:59.240 --> 12:00.440
You are able to convert it.

12:00.470 --> 12:00.980
Right.

12:00.980 --> 12:05.720
So if I go ahead and print, uh, the type of int of age.

12:05.750 --> 12:06.590
Yes, definitely.

12:06.590 --> 12:07.820
You are able to convert it.

12:07.850 --> 12:08.390
Right.

12:08.390 --> 12:10.160
And here I'm just going to close it.

12:10.160 --> 12:10.430
Yes.

12:10.430 --> 12:11.510
The class is int.

12:11.570 --> 12:12.740
This is fine.

12:12.890 --> 12:16.790
But still I will just go ahead and use one more.

12:16.790 --> 12:17.630
Some more examples.

12:17.630 --> 12:26.450
Let's say if I go ahead and write my name is Krish right now do I, can I convert this into an integer?

12:26.480 --> 12:28.220
The answer is no, right?

12:28.220 --> 12:31.820
Because obviously Krish is a complete sentence, right?

12:31.820 --> 12:36.590
If I talk about 25 in string manner, this is basically a numerical value itself, right?

12:36.620 --> 12:40.400
So even though it is in a string, I can convert this into an int type.

12:40.400 --> 12:43.190
But over here this is my string complete string.

12:43.190 --> 12:45.950
I cannot just convert this into an integer type or a float type.

12:45.950 --> 12:50.630
So here you basically get an error saying that invalid literal for int with base ten Krish.

12:50.660 --> 12:51.170
Right?

12:51.170 --> 12:54.530
So this is the value that you are able to get it over here, right.

12:54.650 --> 12:56.330
Another example some more example.

12:56.330 --> 12:57.980
Let's define some float value.

12:58.010 --> 12:58.430
Right.

12:58.430 --> 13:04.430
So let's say my uh my height is nothing but 6.1 okay.

13:04.640 --> 13:09.530
Or let's say 6.0 or 6.0 or 5.11 okay.

13:09.560 --> 13:10.250
Something.

13:10.280 --> 13:10.850
Okay.

13:11.030 --> 13:19.580
Now if I go ahead and see the type of height, what exactly it is, it is nothing but float, right?

13:19.580 --> 13:22.910
Can I convert this float into an integer?

13:23.210 --> 13:24.140
The answer is yes.

13:24.140 --> 13:29.270
So if I go ahead and write int and I do the type casting for this particular height variable, you'll

13:29.300 --> 13:31.670
be able to see that I'm able to get five right.

13:31.670 --> 13:34.370
That basically means it is just going to remove the decimal, right?

13:34.400 --> 13:35.870
Can I do the opposite again?

13:35.870 --> 13:39.230
Can I again typecast this from int to float again?

13:39.260 --> 13:43.280
Yes I can, and it is going to give me 5.0 right.

13:43.280 --> 13:44.600
So 5.11.

13:44.660 --> 13:47.450
Initially I converted this into an integer I got 5.0.

13:47.480 --> 13:49.340
Then again sorry I got five.

13:49.340 --> 13:51.440
And then again I converted that into float.

13:51.440 --> 13:52.520
So I got 5.0.

13:52.550 --> 13:57.970
So this is some example with respect to the conversion right type checking conversion.

13:57.970 --> 14:00.970
So this is what I really want to show you over here.

14:01.000 --> 14:01.570
Okay.

14:01.690 --> 14:04.030
Now let me do one thing.

14:04.690 --> 14:10.090
Let me talk about one very important concept which is called as dynamic typing okay.

14:10.120 --> 14:12.970
And this is probably the most amazing feature in Python.

14:13.000 --> 14:13.540
Okay.

14:13.570 --> 14:15.880
Let's say I'm going to define a variable ten.

14:15.910 --> 14:19.660
Okay I'm going to define a variable ten okay.

14:19.690 --> 14:23.740
Now let me just go ahead and write print var.

14:25.750 --> 14:31.330
Where I'm going to print this var and I'm going to also print type of var okay.

14:31.750 --> 14:32.830
Type of var.

14:33.280 --> 14:33.790
Perfect.

14:33.790 --> 14:35.530
So this initially is an integer.

14:35.530 --> 14:37.570
Then obviously it should give ten.

14:37.600 --> 14:38.560
It should display ten.

14:38.560 --> 14:40.630
And it should say that hey it is an integer.

14:40.780 --> 14:48.580
Now Python allows the type of a variable to change as the program executes, right?

14:48.610 --> 14:50.500
So let me write down this particular comment.

14:50.560 --> 14:58.300
Python allows the type of variable to change.

14:59.440 --> 15:04.150
To change as the program executes.

15:04.210 --> 15:04.600
Right?

15:04.630 --> 15:05.800
Amazing, right?

15:06.100 --> 15:07.510
Now, what does this basically mean?

15:07.510 --> 15:11.110
Now I can go ahead and change the value of var and I can write.

15:11.140 --> 15:11.740
Hello.

15:11.770 --> 15:12.280
Okay.

15:12.310 --> 15:17.260
And let's say I'm going to print var comma type of var okay.

15:17.290 --> 15:20.260
This time obviously you know what it will output will be string.

15:21.220 --> 15:23.590
If you are not satisfied with this again you can change.

15:23.590 --> 15:27.760
So as you keep on executing the code you can keep on changing it.

15:27.760 --> 15:30.430
Let's say now this time I defined it as a float variable.

15:30.460 --> 15:36.310
Now if I go ahead and write print var okay var comma type of var.

15:36.340 --> 15:41.200
So if I go ahead and execute this here, you'll be able to see that I'm able to get this right.

15:41.200 --> 15:45.250
So see initially it was ten class int hello class str.

15:45.250 --> 15:47.950
And finally 3.14 class is float.

15:47.950 --> 15:49.180
So what is basically happening.

15:49.180 --> 15:54.100
Python is allowing this type of a variable to change as the program gets executed.

15:54.100 --> 15:54.520
Right.

15:54.520 --> 15:56.080
So we can basically do this.

15:56.110 --> 16:00.460
Okay, now, uh, let's do one amazing thing.

16:00.490 --> 16:06.430
Let's just create a simple, uh, application with whatever things we are specifically not.

16:06.460 --> 16:07.000
Okay.

16:07.210 --> 16:09.760
And before that, let me just talk about input.

16:09.790 --> 16:10.000
Okay.

16:10.030 --> 16:11.200
Now, what exactly is input?

16:11.200 --> 16:15.490
Let's say that, uh, a user wants to give some values, right?

16:15.520 --> 16:16.900
Let's say age.

16:16.900 --> 16:18.010
And I have told that.

16:18.010 --> 16:19.990
Hey, user, you give the value.

16:20.020 --> 16:21.220
What is the age?

16:21.250 --> 16:21.790
Okay.

16:22.000 --> 16:23.140
What is the age?

16:23.140 --> 16:24.790
So I, I am a user.

16:24.790 --> 16:26.650
I want to probably give the value over here.

16:26.680 --> 16:34.420
So if I use this right input function and if I print age over here see what will happen.

16:34.420 --> 16:37.240
So once I execute this statement now see what will happen.

16:37.240 --> 16:40.870
So here you can see a input box has got opened.

16:40.870 --> 16:43.750
So here I'm just going to give my uh age.

16:43.750 --> 16:45.880
Let's say the age is 23 okay.

16:45.910 --> 16:47.260
And I'm going to press enter.

16:47.260 --> 16:49.510
So here you can see I'm printing the age now.

16:49.510 --> 16:51.730
One very important thing to show you, right.

16:51.760 --> 16:54.550
What will be the type of this age okay.

16:54.610 --> 16:59.410
So that basically means whenever I'm giving any input from this particular input box by using this input

16:59.410 --> 17:02.050
function, what will be the type of it by default?

17:02.080 --> 17:02.380
Type.

17:02.380 --> 17:04.510
So here I'm going to go ahead and write 23.

17:04.570 --> 17:06.460
And here you can see it is a string type.

17:06.460 --> 17:09.310
So let's say I want to probably get this particular input.

17:09.310 --> 17:12.670
And then also convert this into an integer or float.

17:12.670 --> 17:15.370
So I can again type cast this entire thing.

17:15.400 --> 17:15.880
Right.

17:15.880 --> 17:21.100
So now if I go ahead and execute this and let me just go ahead and write 23 and press enter.

17:21.100 --> 17:23.440
So here you can see I'm getting a class int right.

17:23.440 --> 17:30.670
So this is one very important functionality for uh the entire input function over here.

17:30.670 --> 17:32.740
And this can be very handy.

17:32.740 --> 17:35.230
And it can be used in various places okay.

17:35.260 --> 17:39.700
So I hope you are able to execute this and you are able to understand this.

17:39.700 --> 17:41.890
So I'm just going to show you one example again.

17:41.920 --> 17:43.210
Now let us do one thing.

17:43.210 --> 17:47.410
Let us simply create one simple calculator okay.

17:47.500 --> 17:50.050
Now this simple calculator will be amazing.

17:50.050 --> 17:55.020
So here you can just see that what this calculator is doing I'm giving two numbers.

17:55.020 --> 17:58.800
Uh, again, I'm using this input, uh, number one again.

17:58.800 --> 18:00.660
Number two, then some.

18:00.660 --> 18:04.470
I'm doing num plus num one plus num two difference num one minus two.

18:04.500 --> 18:08.490
And product is num one multiplied by num two num one divided by num two.

18:08.520 --> 18:11.340
We will discuss more about this operators as we go ahead.

18:11.370 --> 18:14.010
And we are just going to display all the sum difference and all.

18:14.010 --> 18:15.720
So let's go ahead and execute it.

18:15.720 --> 18:17.730
Let's say the first number is 56.

18:17.730 --> 18:20.820
I'll go ahead and press enter again I've got my another cell.

18:20.850 --> 18:26.790
Let's say I'm going to write 43 or 10 something and press enter.

18:26.790 --> 18:31.800
So here you can see I'm able to see all the ounces like some difference product and quotient.

18:31.830 --> 18:32.400
Right.

18:32.490 --> 18:33.600
So yes.

18:33.600 --> 18:35.850
Uh, this was uh, amazing.

18:35.850 --> 18:40.530
This was I guess, you, you are able to understand many things about variables.

18:40.830 --> 18:42.540
Uh, this was it from my side.

18:42.540 --> 18:46.470
Uh, in the next video, I am going to probably discuss more about data types.

18:46.470 --> 18:49.350
And then finally we'll also be discussing about operators.

18:49.350 --> 18:50.670
What are the different different data types.

18:50.670 --> 18:52.050
Also we need to discuss about.

18:52.050 --> 18:53.550
So yes, this was it from my side.

18:53.550 --> 18:54.660
I will see you in the next video.

18:54.660 --> 18:54.990
Thank you.
