Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,690 --> 00:00:07,320
All right, so in the previous video, what we talked about was a function called to lower and this
2
00:00:07,320 --> 00:00:10,290
function received a character and checked out.
3
00:00:10,440 --> 00:00:17,880
If this character is an Apricus letter and if that's the case, then basically what we had to do is
4
00:00:17,880 --> 00:00:23,600
to calculate the lowercase representation of these given letter and to return it.
5
00:00:24,090 --> 00:00:33,060
And we've done it using the Huskie to the ASCII table to find out these formula that was used and helped
6
00:00:33,060 --> 00:00:34,830
us in this task.
7
00:00:36,030 --> 00:00:42,930
In all simply happened here is once again we took the decimal representation of a given character and
8
00:00:42,930 --> 00:00:49,110
we reduced the decimal representation of the lower the uppercase A..
9
00:00:49,470 --> 00:00:57,630
OK, just to get some, I don't know, some distance between the first letter, which is a up to a given
10
00:00:57,630 --> 00:00:59,280
letter which was unknown.
11
00:00:59,760 --> 00:01:06,510
And this distance, like this example, it was sixty seven representation of a gap F of uppercase C
12
00:01:06,660 --> 00:01:12,410
minus uppercase A. which was 67 minus sixty five, which was still.
13
00:01:12,510 --> 00:01:22,050
And we simply added these two to the lowercase eight to simply take the lowercase A to the R, the lowercase
14
00:01:22,050 --> 00:01:28,150
C representation and we return it using this return statement.
15
00:01:28,560 --> 00:01:29,880
So I hope that was clear.
16
00:01:29,880 --> 00:01:38,640
And now in this video we are going simply to do something which is pretty much the same just to utilize
17
00:01:38,640 --> 00:01:46,920
and to implement the two upper two upper function in these two upper function is going to work on a
18
00:01:46,920 --> 00:01:48,750
very similar principle.
19
00:01:49,500 --> 00:01:50,660
It will be like this.
20
00:01:50,670 --> 00:01:52,730
So char to opera.
21
00:01:53,370 --> 00:01:57,960
And what this function is going to do is, again, to receive some letter.
22
00:01:59,490 --> 00:02:06,840
And once you receive some letter and you have to decide and to make some check to check some condition,
23
00:02:07,740 --> 00:02:14,590
if, OK, if letter is going to be a lowercase letter.
24
00:02:14,670 --> 00:02:17,760
OK, then in this case we should return the uppercase.
25
00:02:17,760 --> 00:02:18,080
Right.
26
00:02:18,090 --> 00:02:19,550
That's the name of the function.
27
00:02:19,950 --> 00:02:30,810
So if letter is greater than lowercase eight and also if the letter is less than or equal to lowercase
28
00:02:30,870 --> 00:02:31,500
Z.
29
00:02:31,740 --> 00:02:32,100
Right.
30
00:02:32,100 --> 00:02:39,840
Lowercase Z, then in this case we should calculate and find out the uppercase representation of the
31
00:02:39,840 --> 00:02:40,350
letter.
32
00:02:40,410 --> 00:02:43,120
So in this case, we should return the letter.
33
00:02:43,800 --> 00:02:46,590
Very similar principle to what we've done previously.
34
00:02:46,680 --> 00:02:52,490
OK, we know that the letter is a lower case than we will use minus lowercase A..
35
00:02:53,200 --> 00:02:55,620
OK, plus opera.
36
00:02:55,620 --> 00:02:56,160
Casey.
37
00:02:56,850 --> 00:02:58,790
OK, very, very similar.
38
00:02:58,800 --> 00:03:01,950
So we reduced it almost to the zero.
39
00:03:01,950 --> 00:03:02,250
Right.
40
00:03:02,250 --> 00:03:04,500
To find like the the gap, the distance.
41
00:03:05,100 --> 00:03:10,380
And we used the letter minus lowercase since we knew that in this case.
42
00:03:10,410 --> 00:03:15,690
OK, if this condition is satisfied then the letter itself is a lower case.
43
00:03:16,200 --> 00:03:26,550
And then what we should do is just to add this kind of number to the capital, letter A. to its decimal
44
00:03:26,550 --> 00:03:32,500
representation, to get the actual uppercase character that we wanted.
45
00:03:33,300 --> 00:03:34,740
So I hope that's clear.
46
00:03:34,770 --> 00:03:44,040
OK, and basically this is the other return ale's return, return, return minus one.
47
00:03:45,680 --> 00:03:53,930
Who so I hope this is clear to you guys and also another important note is the reason why we used here
48
00:03:53,930 --> 00:04:01,280
letter is greater than a and we use these nice things before it is, because if you would use it like
49
00:04:01,280 --> 00:04:09,470
this, if letter is greater than a, then what our compiler would have thought is that A is a variable
50
00:04:09,470 --> 00:04:12,920
and it would try to search for this variable value.
51
00:04:13,880 --> 00:04:15,650
And that's not something that we want.
52
00:04:15,650 --> 00:04:23,350
We want are we want the letter to be compared with the character AI itself.
53
00:04:25,450 --> 00:04:28,660
So thank you guys for watching.
54
00:04:28,900 --> 00:04:38,500
This exercise was not the easiest one and yeah, and in the next videos, I think I will do also one
55
00:04:38,500 --> 00:04:44,830
or two videos regarding the ASCII tables, just to like to sharpen your knowledge to make you even more
56
00:04:44,830 --> 00:04:46,820
experienced in one of them.
57
00:04:47,130 --> 00:04:49,480
Yeah, this is Alphatech and my name is.
58
00:04:49,870 --> 00:04:52,260
I'll see you in the next videos.
59
00:04:52,690 --> 00:04:54,010
Take care of yourself.
60
00:04:54,190 --> 00:04:55,060
Study more.
61
00:04:56,260 --> 00:04:57,220
Enjoy life.
62
00:04:57,610 --> 00:04:59,710
Do your daily exercises.
63
00:05:00,370 --> 00:05:02,470
And thank you, guys.
64
00:05:02,500 --> 00:05:03,210
I'll see you then.
6000
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.