Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,210 --> 00:00:06,300
So this challenge is very similar to the previous one, except two minor changes.
2
00:00:06,540 --> 00:00:13,200
The first one is that now we want to read the numbers from the user to read the digits instead of just
3
00:00:13,290 --> 00:00:16,590
initializing these array that we've created previously.
4
00:00:16,740 --> 00:00:19,080
You already know how you can do it, right?
5
00:00:19,860 --> 00:00:25,080
Simply by declaring an array of size, let's say seven, as we've done previously.
6
00:00:25,590 --> 00:00:33,270
And then just using the input function to read every digit from the user and put it inside this array.
7
00:00:33,420 --> 00:00:40,020
And also another change is that instead of finding the maximum value like we've done in the previous
8
00:00:40,020 --> 00:00:47,850
challenge, we are going to find and print the index, the actual location of the maximum value in these
9
00:00:47,880 --> 00:00:48,840
given array.
10
00:00:49,020 --> 00:00:52,020
So we are not interested in the value itself.
11
00:00:52,080 --> 00:00:59,610
Like in this example is just nine, but rather we are interested in leads location with where it resides
12
00:00:59,610 --> 00:01:04,120
within this array, its index, which in this case will be just four.
13
00:01:04,220 --> 00:01:04,560
Right.
14
00:01:04,770 --> 00:01:08,220
The index of the maximum value, the maximum value is nine.
15
00:01:08,490 --> 00:01:11,040
But its index is just four.
16
00:01:11,190 --> 00:01:14,670
So once again, previously we found down the maximum value.
17
00:01:14,700 --> 00:01:18,900
And now we want to print out to the screen the index of that value.
18
00:01:19,430 --> 00:01:25,920
A similar exercise with the digits from your phone number, except for the two changes we've just added.
19
00:01:26,310 --> 00:01:28,140
So let's give it a try, shall we?
1972
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.