WEBVTT

00:00.000 --> 00:15.480
Hi, friends. In this video, we are going to discuss about why we need Python. Python is

00:15.480 --> 00:22.440
a powerful programming language. Let's learn why do we need Python and its applications.

00:22.440 --> 00:27.560
One thing is dynamic typed language. Let us discuss it with an example. Consider this

00:27.560 --> 00:33.880
code in C programming language. We have integer variable, I declared and initialized to 10. Then

00:33.880 --> 00:39.320
we are setting I to hello, which is a string. Then we are setting I to a float value, but

00:39.320 --> 00:47.240
is that possible? No. I is an integer type variable, so it can only accept integer values.

00:47.240 --> 00:53.840
That is in C, as well as in C++. The type of the variable is verified at compile time.

00:53.840 --> 00:59.520
So once we define the type, it won't accept other data type values, but Python has dynamically

00:59.520 --> 01:05.320
typed language and type checking happens at runtime. So we can assign any and all kind

01:05.320 --> 01:09.960
of data to a variable, it will be handled efficiently at runtime, which makes it very easy

01:09.960 --> 01:16.640
to program. Next is user friendly syntax of Python. In C, if we want to print a message,

01:16.640 --> 01:21.680
we should include the header file, main function, and semicolon at the end of every statement.

01:21.680 --> 01:26.480
But in Python, we can simply do it with a single print function. This makes anyone can easily

01:26.480 --> 01:32.320
learn Python. Next is the readability of Python. If we write this unindented C code, it will

01:32.320 --> 01:37.440
still run and produce output, even though it is not readable. But in Python, if we write

01:37.440 --> 01:42.720
without indentation, it won't run. By default, Python enforces readability. If we want

01:42.720 --> 01:47.560
to run the program, we should align it with proper indentation like this. Hence Python

01:47.560 --> 01:52.920
codes are readable in nature, which makes it easy to maintain it. Next is Python increases

01:52.920 --> 01:57.760
developer productivity. In C, if you want to check whether a number exists in an array or

01:57.760 --> 02:03.920
not, we need to write this code or other equally long codes. But in Python, we can achieve it

02:03.920 --> 02:09.360
in very few lines like this. So developers can easily develop a large software, and this

02:09.360 --> 02:14.760
is how Python increases productivity, and Python has a lot of supporting libraries. All

02:14.760 --> 02:19.120
the above characteristics make Python a perfect language for scripting and rapid application

02:19.120 --> 02:24.560
development. Now, what all can we do with Python? It can be used to develop a graphical

02:24.560 --> 02:30.480
user interface. It can be used in web development, in scripting, in image processing, in machine

02:30.480 --> 02:36.320
learning, et cetera. So what is the drawback of Python? Execution speed is lower compared

02:36.320 --> 02:42.240
to C, and C plus plus C is a low-level programming language, so it will directly communicate

02:42.240 --> 02:48.080
with the hardware. Hence, its execution speed is high. Python code will not directly communicate

02:48.080 --> 02:52.960
with the hardware. It is intermittently processed, and then it will be converted into low-level

02:52.960 --> 02:57.960
language, and it will communicate with the hardware. So, the execution speed of Python

02:57.960 --> 03:03.320
is very low compared to C and C plus plus. So today, we have learned why we need Python

03:03.320 --> 03:08.800
programming language. We discussed the major benefits of using Python. It has dynamic-typed

03:08.800 --> 03:15.280
language, user-friendly syntax, its readability, and its increased developer productivity. Then

03:15.280 --> 03:20.520
we discussed the dual abilities of Python, and the big companies that use Python language,

03:20.520 --> 03:26.600
and finally the drawback of Python, which is the lower execution speed. So that's all,

03:26.600 --> 03:28.080
and thank you for watching this video.

