Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
0
1
00:00:00,768 --> 00:00:04,352
Now let us look at the round function. Round is a very important function
1
2
00:00:04,864 --> 00:00:06,144
You may have noticed that
2
3
00:00:06,656 --> 00:00:09,984
Whenever you are transacting, you transact in integer values
3
4
00:00:10,752 --> 00:00:14,848
The money that you gave to someone person, it is integer values usually
4
5
00:00:15,360 --> 00:00:19,456
Where as the price written for various products is in decimal points
5
6
00:00:20,224 --> 00:00:20,736
So
6
7
00:00:20,992 --> 00:00:24,064
Whenever you are transacting you want to round that price
7
8
00:00:24,320 --> 00:00:25,856
To the nearest integer
8
9
00:00:26,112 --> 00:00:28,160
That's where round function helps you
9
10
00:00:29,184 --> 00:00:33,792
The syntax for Round function is simple you just right round and give the
10
11
00:00:34,048 --> 00:00:35,328
Number that you want to round
11
12
00:00:35,584 --> 00:00:37,888
It'll round that number to the nearest integer
12
13
00:00:40,448 --> 00:00:43,520
So for example I have sales values in the sales table
13
14
00:00:44,032 --> 00:00:45,568
It has two decimal places
14
15
00:00:46,080 --> 00:00:49,152
The round function will round it to the nearest integer
15
16
00:00:49,408 --> 00:00:53,760
So let us find out the sales values and the its rounded values
16
17
00:00:54,528 --> 00:00:57,344
So if you can see in the sales table
17
18
00:00:59,904 --> 00:01:01,440
The sales value has
18
19
00:01:02,208 --> 00:01:03,488
Two decimal values
19
20
00:01:03,744 --> 00:01:05,024
If we round it
20
21
00:01:05,536 --> 00:01:06,816
Let us see what we get
21
22
00:01:07,584 --> 00:01:09,632
Select
22
23
00:01:09,888 --> 00:01:10,656
Order line
23
24
00:01:14,496 --> 00:01:15,520
Order line
24
25
00:01:19,360 --> 00:01:25,248
the sales value and the rounded sales value
25
26
00:01:28,576 --> 00:01:29,088
From
26
27
00:01:29,344 --> 00:01:32,160
Sales
27
28
00:01:33,184 --> 00:01:39,328
Ordered by sales in descending
28
29
00:01:40,608 --> 00:01:43,936
Let's run this
29
30
00:01:44,448 --> 00:01:49,824
So you can see 22638
30
31
00:01:50,336 --> 00:01:51,360
Point 48
31
32
00:01:51,616 --> 00:01:54,432
Is rounded to 22638
32
33
00:01:55,456 --> 00:02:01,600
174199.95 is rounded to 17500
33
34
00:02:02,368 --> 00:02:02,880
So
34
35
00:02:03,904 --> 00:02:05,440
When we were using
35
36
00:02:05,696 --> 00:02:08,512
Floor. it was always giving us the lower integer value
36
37
00:02:09,024 --> 00:02:10,304
When we were using the
37
38
00:02:10,560 --> 00:02:14,912
Ceiling, it was giving us only the higher integer value when you are rounding up
38
39
00:02:15,168 --> 00:02:17,216
It will give you the nearest integer value
39
40
00:02:17,728 --> 00:02:18,752
So that's the difference
40
41
00:02:19,520 --> 00:02:20,544
Round is just
41
42
00:02:21,312 --> 00:02:23,872
taking you to the nearest integer value to that
42
43
00:02:24,128 --> 00:02:25,920
Decimal number that you've input
3227
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.