WEBVTT

00:01.230 --> 00:03.630
Now, let's solve the next question.

00:03.660 --> 00:11.910
This is a slightly difficult in nature, so we will be tackling more difficult questions over the time.

00:12.300 --> 00:14.070
So please don't get intimidated.

00:14.790 --> 00:17.310
We will solve these step by step.

00:17.790 --> 00:20.200
Just try to solve these questions.

00:20.220 --> 00:21.000
I do it all.

00:21.030 --> 00:26.370
And in case you find any difficulty, you can go ahead and look at the solutions.

00:26.790 --> 00:28.950
So let's look at the first question.

00:29.280 --> 00:37.770
So given the names and grades for each student in a class of in students, store them in a nested list

00:38.220 --> 00:43.650
and print the names of any student having the second lowest grade.

00:45.390 --> 00:51.930
So if there are multiple students with the second lowest grade, ordered the names alphabetically and

00:51.930 --> 00:54.180
print each name on a new line.

00:54.480 --> 01:00.960
So basically, we will be having any students who let's get the means of end student and then try to

01:00.960 --> 01:04.110
find out the student who is having bluescreen.

01:05.010 --> 01:12.450
So you can pause the video here and then solve the question and you can have a look at the solution.

01:12.450 --> 01:12.940
One step.

01:20.210 --> 01:22.640
So now let's start solving this problem.

01:22.970 --> 01:28.640
So first, we will need to have the number of students in the class, so let's get the number of students

01:28.640 --> 01:29.870
in the class in.

01:33.830 --> 01:37.440
And because it is a numbers, so it has to be in danger.

01:37.460 --> 01:43.370
So we say in and then we take the input and inside the input.

01:43.550 --> 01:51.920
Let us ask a question that please provide the number of students.

01:57.260 --> 02:03.500
Next, we need to create a list, a nested list of the marks of the servants.

02:03.950 --> 02:05.240
So let's get the same.

02:05.240 --> 02:07.820
So let's keep stude marks.

02:15.530 --> 02:18.050
So we'll take the input

02:32.920 --> 02:33.010
of

02:40.460 --> 02:41.120
the names.

02:42.680 --> 02:49.550
And next, we will take the score of the student.

02:54.950 --> 02:56.270
School can be affluent.

02:57.650 --> 02:59.930
So we will save it as a float.

03:16.920 --> 03:24.450
Now we want to get this, we want to save this for an

03:26.490 --> 03:28.020
invention

03:30.150 --> 03:30.410
and.

03:41.940 --> 03:44.490
So let's run with this for once.

03:52.200 --> 03:53.590
So let's take two.

03:55.110 --> 03:59.370
So the A's and the school is 23.

03:59.940 --> 04:01.080
Let it be.

04:01.680 --> 04:06.940
And the school is 12 to see and this gorgeous.

04:07.500 --> 04:08.580
Eighty seven.

04:10.710 --> 04:13.710
So you can see we are saving it in the Néstor list.

04:15.750 --> 04:22.260
Now, what we want to achieve it is we want to check for each and every student.

04:22.620 --> 04:27.750
And we want to get the name of the student with the mark.

04:28.050 --> 04:31.950
The marks which they have got is the second lowest.

04:32.850 --> 04:33.240
OK.

04:33.450 --> 04:37.350
So for this, we will need to get all the marks for the student.

04:38.070 --> 04:44.850
Then we will basically find out the second lowest mark out of this.

04:46.260 --> 04:47.730
So how can we do that?

04:49.710 --> 04:53.730
So let's get the marks for NEMCO marks and stroma.

04:57.600 --> 05:00.480
So here we have all the marks for the students.

05:01.290 --> 05:02.890
Now, then we worry.

05:03.000 --> 05:04.260
Then we are using six.

05:04.710 --> 05:08.040
We will be getting one of each of the values.

05:08.370 --> 05:11.040
Now we want to convert this into a list.

05:11.880 --> 05:13.020
So we say list.

05:18.180 --> 05:20.820
And for there, we want to sort this list.

05:21.450 --> 05:22.950
So we have selected.

05:26.970 --> 05:27.900
Let's see what we get.

05:28.410 --> 05:29.820
So we get this sorted list.

05:30.150 --> 05:33.320
Now, I want to get the second element.

05:33.360 --> 05:34.930
That is the second last element.

05:34.950 --> 05:36.450
So I want indexed one.

05:37.020 --> 05:39.380
So I see one here.

05:40.350 --> 05:41.220
So this is it.

05:41.960 --> 05:45.600
Now, this is the mark which I want.

05:45.990 --> 05:49.530
So I want to call them this from these two.

05:49.860 --> 05:56.130
I want to be meem with my mark is equal to this.

05:56.760 --> 05:57.810
So what do we see?

05:58.750 --> 05:59.400
We'll see.

06:00.990 --> 06:05.580
Give me the name for me.

06:09.430 --> 06:10.210
Go mama

06:13.690 --> 06:14.050
in.

06:23.800 --> 06:24.160
Is.

06:27.300 --> 06:30.710
Time to do this.

06:34.970 --> 06:36.740
Let's run this.

06:46.730 --> 06:51.100
So I get a logistic got counter.

06:55.350 --> 06:58.050
If I would have not given this condition,

07:02.310 --> 07:07.950
then I would have got all the names on one side, give this particular condition, I can get the one

07:07.950 --> 07:11.460
which has the second right now in case.

07:11.460 --> 07:13.740
Why have we used that here?

07:13.950 --> 07:17.580
Because there could be multiple students who can have the second lowest grade.

07:18.030 --> 07:25.350
So when we have this, what will happen is that it will automatically return all the elements where

07:25.350 --> 07:27.420
math will be equal to this particular value.

07:27.450 --> 07:31.740
So if there are one student with the second lowest mark, over one hundred students, if rules are done,

07:31.740 --> 07:32.250
all of them.
