Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,370 --> 00:00:06,500
Hi, ladies and gentlemen, and welcome to another video in our amazing programming course.
2
00:00:07,100 --> 00:00:13,850
And in this exercise, what I would like to ask you to do is simply to create two programs okay.
3
00:00:13,880 --> 00:00:19,940
They should not be very complicated, but still they are kind of nice to practice.
4
00:00:20,690 --> 00:00:24,340
So these two programs are going to consist of two parts.
5
00:00:24,350 --> 00:00:31,670
The first program is going that you are going to develop is a program that all he does is simply eat
6
00:00:31,670 --> 00:00:36,140
prince, all the unique elements in an array to the screen.
7
00:00:36,920 --> 00:00:43,670
So for any given array that you will get, OK, let's say you created just some program with, let's
8
00:00:43,670 --> 00:00:44,960
say, 10 values.
9
00:00:45,860 --> 00:00:54,440
So your task is to iterate over all of the elements of this array and ask yourself if this element is
10
00:00:54,440 --> 00:00:56,060
unique or not.
11
00:00:56,840 --> 00:01:01,910
If it is unique, printed, if it's not unique, then do not print it.
12
00:01:02,660 --> 00:01:05,530
So for example, let's say you have something like that.
13
00:01:05,540 --> 00:01:15,200
Okay, so let's say you've got an array of values five seven three four five six eight nine, I don't
14
00:01:15,200 --> 00:01:19,130
know eight and then goes like three.
15
00:01:20,060 --> 00:01:23,640
So you ask yourself a simple question is this five a year?
16
00:01:24,020 --> 00:01:25,910
And in any place here?
17
00:01:26,250 --> 00:01:26,780
Else?
18
00:01:27,110 --> 00:01:27,800
Yes, it is.
19
00:01:27,920 --> 00:01:30,440
So we do not brain dead since it's not unique.
20
00:01:31,070 --> 00:01:35,810
But on the other hand, seven is a value that appears only here.
21
00:01:36,200 --> 00:01:38,150
So that's a unique value.
22
00:01:38,810 --> 00:01:42,740
That's why we will print it and so on and so forth.
23
00:01:42,860 --> 00:01:47,540
So for any given array, you will need to print all of the unique elements.
24
00:01:48,380 --> 00:01:52,880
The second part for this exercise may be done in two different programs.
25
00:01:52,880 --> 00:01:56,060
Or maybe it can also be done in just one program.
26
00:01:56,090 --> 00:01:57,290
Well, that depends.
27
00:01:57,320 --> 00:01:59,240
OK, well, we'll see what we will do in the solution.
28
00:01:59,600 --> 00:02:05,420
You can do it in both of them in just one exercise and one program.
29
00:02:05,420 --> 00:02:07,400
You can do it in two different programs.
30
00:02:07,930 --> 00:02:12,500
I'm probably I will combine the solution to be in just one program.
31
00:02:12,740 --> 00:02:18,440
So then the second part is to count the total number of unique elements in an array.
32
00:02:18,890 --> 00:02:21,530
So first of all, we printed out all of the elements.
33
00:02:21,860 --> 00:02:28,340
But meanwhile, we also created some counter to count the number of unique elements in the array.
34
00:02:29,330 --> 00:02:33,110
OK, so that's what we are going to do and basically, that's what you are going to do.
35
00:02:33,410 --> 00:02:39,950
So my recommendation is before moving forward trying to solve this exercise in your realm, try to think
36
00:02:39,950 --> 00:02:48,050
about what should be used here, what loops, what conditions and what everything else should be used
37
00:02:48,050 --> 00:02:48,290
here.
38
00:02:48,780 --> 00:02:53,540
So, yeah, so there this way, you will be able to solve it on your own.
39
00:02:53,540 --> 00:03:01,580
And once you've tried and you see some success or maybe you something didn't happen to be so successful,
40
00:03:01,850 --> 00:03:08,450
you can always move on to the next video, which is not mandatory, but it's here to assist you and
41
00:03:09,020 --> 00:03:11,810
let you see if you are doing quite well.
42
00:03:12,380 --> 00:03:16,580
So good luck and I'll see you in the solutions video by.
4202
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.