Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,570 --> 00:00:07,590
All right, so welcome back to another video in our programming course in this video we are going to
2
00:00:07,590 --> 00:00:13,750
do it's not going to be an easy exercise, but I think we are going to be just fine.
3
00:00:14,370 --> 00:00:20,130
So what do we have to do here is to write a program that receives a size value from the user, just
4
00:00:20,130 --> 00:00:20,890
some value.
5
00:00:21,030 --> 00:00:27,220
OK, and once we receive this value, the program should read a sequence.
6
00:00:27,240 --> 00:00:27,780
All right.
7
00:00:27,790 --> 00:00:35,640
So a sequence of size numbers and check if the numbers are very ascending or not.
8
00:00:36,450 --> 00:00:46,740
So basically, what we have to do is, for example, we received size equals to seven, OK, size equals
9
00:00:46,740 --> 00:00:47,410
to seven.
10
00:00:48,060 --> 00:00:56,730
Then in this case, what we have to do is simply to run the input function and read the value, some
11
00:00:56,730 --> 00:00:57,960
value from the user.
12
00:00:57,990 --> 00:01:00,930
So the first value is going to be one.
13
00:01:01,270 --> 00:01:06,270
The second value is going to be nine, 14, 15 and so on and so forth.
14
00:01:06,300 --> 00:01:08,480
OK, so here it's not 13.
15
00:01:08,490 --> 00:01:10,010
It should be 18.
16
00:01:10,050 --> 00:01:12,160
OK, so a team.
17
00:01:12,240 --> 00:01:14,670
OK, so it's 18, 18.
18
00:01:16,050 --> 00:01:19,130
Then read this value, this value and this value.
19
00:01:19,890 --> 00:01:27,980
And finally, the program should print if this sequence is very ascending or not.
20
00:01:28,290 --> 00:01:35,030
And that means that every time that we get a value, it must be greater than the previous one.
21
00:01:35,040 --> 00:01:39,840
So we know nothing is greater than one, 14 is greater than nine and so on.
22
00:01:39,870 --> 00:01:41,560
So basically you can do like this.
23
00:01:41,580 --> 00:01:46,010
OK, so 14 is greater a greater, a greater, greater and greater.
24
00:01:46,530 --> 00:01:50,340
And if that's the case, the program should print various sending.
25
00:01:50,370 --> 00:01:52,230
OK, that we will see right away.
26
00:01:52,260 --> 00:01:54,200
So this is very sending.
27
00:01:54,840 --> 00:02:03,540
But for example, if we received size equals to three, just just another example, then in this case
28
00:02:03,540 --> 00:02:07,470
we can see that we get two and then we get one.
29
00:02:07,590 --> 00:02:13,110
OK, so all the values that we are getting are simply represented from the left to the right in this
30
00:02:13,110 --> 00:02:13,470
case.
31
00:02:13,800 --> 00:02:20,250
So two is the first number and then we get one and we can say absolutely that one is not greater than
32
00:02:20,250 --> 00:02:20,560
two.
33
00:02:20,970 --> 00:02:26,520
Then we know that this sequence will be not very ascending.
34
00:02:26,670 --> 00:02:27,070
Right.
35
00:02:27,930 --> 00:02:30,090
So this what do you have to do?
36
00:02:30,810 --> 00:02:33,270
That's not an easy exercise.
37
00:02:34,080 --> 00:02:41,190
Most often most of the time, most people that do this exercise for the first time, they have at least
38
00:02:41,460 --> 00:02:43,570
here or there, a small mistake.
39
00:02:44,340 --> 00:02:49,790
So my recommendation is give it some time because it's not so trivial to solve it.
40
00:02:50,430 --> 00:02:58,770
And also, my another request is that since we are proceeding and becoming better programmers, there
41
00:02:58,770 --> 00:03:05,630
is a chance that you have to start thinking about optimizing your solutions.
42
00:03:06,060 --> 00:03:13,890
So if, you know, let's say you have to solve this exercise once again in two ways, the first wave
43
00:03:13,890 --> 00:03:21,270
will be the trivial solution and the second way should be kind of a little bit more optimized option,
44
00:03:21,270 --> 00:03:23,270
a little bit more optimized solution.
45
00:03:23,790 --> 00:03:31,290
And once you are done solving and you found two optional solutions, feel free to check that it works
46
00:03:31,290 --> 00:03:37,290
exactly as you expected and then to compare your results with my results of this video.
47
00:03:38,100 --> 00:03:40,620
So, as always, thank you guys for watching.
48
00:03:40,620 --> 00:03:41,680
Go practice it.
49
00:03:41,730 --> 00:03:45,360
My name is Vlad and this is Alphatech.
50
00:03:45,450 --> 00:03:48,450
OK, so Alphatech, that's where you are.
51
00:03:49,110 --> 00:03:50,370
So until next time.
52
00:03:50,370 --> 00:03:51,540
Until the solution video.
53
00:03:51,540 --> 00:03:52,380
I'll see you then.
4913
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.