WEBVTT

00:00.890 --> 00:03.830
Hey everyone, I welcome you all to this new module.

00:03.830 --> 00:08.720
So in this module we are going to now learn about the basics of problem solving.

00:09.020 --> 00:14.960
Now in this course, since we are starting from complete scratch and making sure that we are able to

00:14.990 --> 00:20.720
teach you everything from basics to advanced, it is very important to understand about problem solving.

00:20.900 --> 00:21.950
Going forward.

00:21.950 --> 00:25.400
We will be learning about lots of data structures and algorithm.

00:25.400 --> 00:31.220
The final aim of them will be to assist you in solving any particular problem.

00:31.400 --> 00:36.290
Now to start with the problem solving, let us first understand on what flowcharts are.

00:36.560 --> 00:44.540
So flowchart, as you can see on our screen, is a graphical representation of any process system or

00:44.540 --> 00:45.470
an algorithm.

00:45.650 --> 00:49.940
Just like we have some process or let's say system which we follow in our life.

00:49.970 --> 00:54.800
Maybe it can be that simple as waking up in the morning, we first maybe brush our teeth.

00:54.830 --> 00:59.510
Then depending on what time is it, maybe we can go out for a run.

00:59.510 --> 01:07.310
It is all dependent on some particular condition and things are happening one after the other in a flow.

01:07.340 --> 01:07.850
Right.

01:07.850 --> 01:15.920
So that's the basic idea behind flow chart to make sure that our problem we can express in a graphical

01:15.920 --> 01:19.250
representation, which is understandable by everyone.

01:19.340 --> 01:25.310
So it uses symbols and arrow to show the sequence of steps needed to complete a task.

01:25.610 --> 01:26.150
Okay.

01:26.300 --> 01:32.720
Flow charts are useful in visualizing how to solve a problem and make the process easier to follow.

01:32.840 --> 01:39.080
The biggest advantage of flow chart, which I feel is that it is actually understood by each and everyone,

01:39.110 --> 01:39.380
right?

01:39.410 --> 01:45.800
So if you are solving some complex problem, maybe the target audience is, let's say, someone who

01:45.830 --> 01:47.630
don't know anything about programming.

01:47.660 --> 01:51.410
They will also be able to understand the flow of a flowchart.

01:51.410 --> 01:52.790
It is that basics.

01:52.940 --> 02:01.820
I have myself use flow chart to explain complex algorithm or any particular complex process many times

02:01.820 --> 02:02.930
in my companies as well.

02:02.930 --> 02:09.530
So when I worked at Goldman Sachs or my article there, I used to make these flowchart to explain if

02:09.530 --> 02:15.050
I've done anything and make sure each and everyone okay is able to understand the same.

02:15.080 --> 02:19.190
So now let us learn about the components of our flowchart.

02:19.190 --> 02:23.060
So talking about the components the first one is the terminal.

02:23.240 --> 02:26.660
It is the start and the stop of our flowchart.

02:26.690 --> 02:33.080
Just like our day starts when we get up right when we wake up, that is when we will put a terminal.

02:33.110 --> 02:33.410
Okay.

02:33.440 --> 02:38.720
So for the start, similarly when we end our day right, that is also somewhere we are going to put

02:38.720 --> 02:40.100
a terminal that is top.

02:40.400 --> 02:43.550
The next is taking the input and the output.

02:43.640 --> 02:49.550
Now many problem require you to take an input and show the output as well okay.

02:49.550 --> 02:56.120
So in those cases this is the kind of a box which we should make so as to explain visually to anyone

02:56.120 --> 03:02.720
that hey, I am expecting an input here, or this is something which I want to show next one is the

03:02.720 --> 03:03.620
process box.

03:03.650 --> 03:04.940
Again, very important.

03:04.940 --> 03:10.970
Any process which you are doing, any activity that is something which comes under this process box.

03:10.970 --> 03:17.870
So if in programming you are adding to number, you are dividing them or overall any other process.

03:18.290 --> 03:22.760
This process box is where what you want to use moving forward.

03:22.760 --> 03:24.170
We have the decision box.

03:24.260 --> 03:29.030
We have learned about the conditionals, namely the if and the else statement.

03:29.780 --> 03:35.000
Decision box is what is used to explain or to use that particular thing in my flowchart.

03:35.090 --> 03:37.850
In decision box we do something.

03:38.120 --> 03:44.420
If let's say something is true and we do the other thing if that thing is false, okay.

03:44.450 --> 03:47.360
So we are going to see the same in the example as well.

03:47.390 --> 03:51.920
Then next is arrow again to connect each and every of my component.

03:51.950 --> 03:53.990
It is of utmost important.

03:54.140 --> 03:56.090
And the last one is the connector.

03:57.170 --> 04:02.660
Now I will be just showing you an example and giving you a question so that you can brush up your skills.

04:02.690 --> 04:05.130
It is very important to know these basics.

04:05.280 --> 04:07.590
If and when required, you can of course dive.

04:07.620 --> 04:09.840
A deep dive deep into flowchart.

04:09.840 --> 04:16.050
But I believe that once the basics are clear, it is almost self-explanatory because we have been using

04:16.050 --> 04:18.930
these things on and off in every aspect of life.

04:18.960 --> 04:20.460
Okay, great everyone.

04:20.460 --> 04:21.810
So now let us move to a question.

04:21.810 --> 04:26.340
The question says create a flowchart to display maximum of two numbers.

04:26.820 --> 04:27.870
So let us start with this.

04:27.870 --> 04:31.770
Everyone talking about the maximum.

04:31.770 --> 04:33.720
What exactly are we required to do.

04:33.750 --> 04:37.530
First and foremost let us create the start box.

04:38.490 --> 04:42.090
So this signifies that my process has started.

04:43.890 --> 04:49.110
Once I have the start box, then I have to display maximum of two numbers.

04:49.110 --> 04:52.740
That means I will have to take the input of these numbers as well.

04:52.770 --> 04:53.370
Right.

04:53.370 --> 04:58.710
So let me create an arrow and then one minute here.

04:58.710 --> 05:04.290
So we are going to have a input box right.

05:04.890 --> 05:07.950
So let us draw a parallelogram in that way.

05:13.050 --> 05:14.400
So this is one input box.

05:14.400 --> 05:16.530
Everyone let me just remove the extra edges.

05:21.360 --> 05:23.370
Here I can take the input.

05:23.370 --> 05:26.670
So here I can say that hey input.

05:30.810 --> 05:34.260
NUM one okay.

05:34.590 --> 05:39.990
Next moving forward I can just define same overall box right everyone.

05:39.990 --> 05:43.740
So same box just for the input two as well.

05:43.770 --> 05:50.700
So let me copy this and let us just have it after this particular box where this time I am going to

05:50.730 --> 05:54.330
take the input of my second number.

05:55.920 --> 05:58.590
So let us just make it nicely.

05:58.590 --> 05:59.070
Yeah.

05:59.670 --> 06:04.350
So here I can ask for input of number two.

06:04.560 --> 06:05.190
Right.

06:05.490 --> 06:09.600
Once I have both the inputs, I have to now take a decision.

06:09.780 --> 06:17.790
The decision is if number one is bigger, then I have to showcase that if number two is bigger, then

06:17.790 --> 06:19.110
I have to showcase that.

06:19.140 --> 06:20.880
Okay, great.

06:20.880 --> 06:24.330
So let us draw our overall decision box everyone.

06:26.040 --> 06:28.260
This is my decision box.

06:31.770 --> 06:36.060
I have joined this and let's say this particular place we are going.

06:36.090 --> 06:37.290
So let me draw it again.

06:37.440 --> 06:40.950
We are going this path if.

06:43.260 --> 06:52.050
The condition whichever I am saying is going to be true here and I am going the other way around, which

06:52.050 --> 06:56.460
is this particular direction.

06:56.490 --> 06:58.800
If the condition is false.

07:01.470 --> 07:06.420
Now let us write down the condition so the condition can be if number one.

07:07.500 --> 07:09.750
greater than number two.

07:10.140 --> 07:14.220
Right now we know that if one is greater than two.

07:14.250 --> 07:18.090
Let me write it down as one greater than two or less space.

07:18.120 --> 07:18.420
Yeah.

07:18.450 --> 07:20.460
One greater than two.

07:20.550 --> 07:22.620
If it is true, then what we have to do.

07:22.620 --> 07:29.040
Everyone, we have to just showcase the overall first number.

07:29.070 --> 07:29.280
Okay.

07:29.310 --> 07:34.590
So again copying this particular box we will draw the line should be fine.

07:34.590 --> 07:38.970
And let us copy here as well because this is some output again which I have to showcase.

07:39.000 --> 07:39.240
Right.

07:39.270 --> 07:40.620
So let us just draw this.

07:40.740 --> 07:43.380
Similarly let us draw this as well everyone.

07:44.070 --> 07:52.140
And instead of input I just have to make sure that I am able to display this particular number.

07:52.170 --> 07:52.830
Right.

07:52.860 --> 07:59.070
So if one is greater then I will have to show number one.

07:59.520 --> 08:03.930
If two is greater then number two.

08:04.650 --> 08:08.520
This particular decision box is helping me take that decision.

08:08.520 --> 08:10.410
If true, I will go here.

08:10.440 --> 08:12.270
If false, I will go here.

08:12.300 --> 08:12.840
Right.

08:12.840 --> 08:14.730
So let us redraw the arrows.

08:14.730 --> 08:15.390
Just.

08:21.630 --> 08:23.820
So that's the first arrow everyone.

08:26.190 --> 08:29.280
And this is the second arrow right.

08:29.550 --> 08:30.150
Great.

08:30.180 --> 08:34.410
Now once I have the display done I'm done with everything.

08:34.590 --> 08:36.420
Now we should create a connector.

08:37.710 --> 08:39.300
Let's join this connector.

08:43.770 --> 08:50.310
So once we have joined everything, finally I can just end my overall flow.

08:50.520 --> 08:50.730
Right?

08:50.760 --> 08:53.160
So this is how we are going to create a flow chart.

08:55.470 --> 08:56.190
Stop.

08:58.200 --> 09:05.850
Just have to make sure that we are using the correct components and doing the basic overall all the

09:05.850 --> 09:07.740
process in these flow chart.

09:07.770 --> 09:10.620
Now there can be a lot complex as well, right?

09:10.890 --> 09:15.510
They can be at a level where any complex problem can also be solved using a flow chart.

09:15.510 --> 09:18.540
So we can draw the flow chart for complexes of the problem.

09:18.540 --> 09:19.800
That is not a problem.

09:19.830 --> 09:25.020
Now, what I want all of you to do now is you have got the basic idea of this.

09:25.050 --> 09:27.570
We already have done lots about the python.

09:27.570 --> 09:33.210
So once we have understood all these things, what I want to do now is to create this flow chart where

09:33.210 --> 09:35.520
you will be adding two numbers.

09:35.520 --> 09:38.340
So you have to create a flow chart to add two numbers.

09:38.520 --> 09:41.160
Again the overall idea is going to be a lot same.

09:41.160 --> 09:43.080
We will start by taking the input.

09:43.110 --> 09:45.090
We will start by taking the second input.

09:45.120 --> 09:49.770
Here the process box will come into picture because adding is some process, right.

09:49.830 --> 09:56.340
Once you have added the same, we just have to display that out using the input or output box and then

09:56.340 --> 09:57.120
stop our flow.

09:57.120 --> 09:59.010
So no decision is going to be there.

09:59.010 --> 10:05.190
That is how we can normally use flow chart, something you should have a good idea about while starting

10:05.190 --> 10:05.520
your journey.

10:05.520 --> 10:07.230
About the problem solving.

10:07.260 --> 10:08.700
Okay, so great everyone!

10:08.700 --> 10:09.990
Now let us meet in the next video.
