1 00:00:02,210 --> 00:00:08,000 In this lecture, we are going to format numbers to have two decimal spaces, and if there are thousands 2 00:00:08,000 --> 00:00:12,530 or greater the thousands, we should have a comma in the example is like this. 3 00:00:12,890 --> 00:00:14,800 OK, so we can create two functions. 4 00:00:14,960 --> 00:00:19,540 The first function will be for this and I'm going to get rid of these decimals. 5 00:00:19,700 --> 00:00:24,530 I don't want in this function to have decimals in four days. 6 00:00:24,540 --> 00:00:30,350 This and when we click here and food or exercise where we can see the calories, we will use the decimals. 7 00:00:30,410 --> 00:00:38,300 OK, now where we should write these functions because it's connected with APU, a controller, we should 8 00:00:38,300 --> 00:00:38,880 put it there. 9 00:00:38,930 --> 00:00:44,690 The logic is that you can put it even in the calories controller, but it will be super bad if you use 10 00:00:44,690 --> 00:00:54,590 them because here, if you go back to after you are controller right now here we do have this item in 11 00:00:55,040 --> 00:00:55,700 here. 12 00:00:55,700 --> 00:00:57,200 We do have the calories. 13 00:00:57,200 --> 00:00:57,550 Right. 14 00:00:57,740 --> 00:01:02,000 And also we do have this display for an app calories. 15 00:01:02,150 --> 00:01:03,980 And we do some calculations there. 16 00:01:03,980 --> 00:01:09,260 We just grab all of it and just put it there so we can we need to form in these numbers, these two 17 00:01:09,300 --> 00:01:12,290 latitude to burn that will be here. 18 00:01:12,580 --> 00:01:16,010 OK, now that is why we should put it there. 19 00:01:16,040 --> 00:01:18,710 Now, I'm going to create this as a private functions and top. 20 00:01:19,280 --> 00:01:19,640 Why? 21 00:01:19,640 --> 00:01:25,940 Because the closures can use the outer functions can use these functions here to private, even if they're 22 00:01:25,940 --> 00:01:29,870 even if the D want the function is finished. 23 00:01:30,200 --> 00:01:30,550 Right. 24 00:01:30,860 --> 00:01:39,920 And if he was doing us a favor that putting that private functions to hide that data and that is called 25 00:01:39,920 --> 00:01:41,270 data encapsulation. 26 00:01:41,960 --> 00:01:42,950 So I'm talking too much. 27 00:01:43,100 --> 00:01:46,730 But no, for the purpose of this, I'm going to test it here. 28 00:01:46,730 --> 00:01:48,530 I'm not going to add calories all the time. 29 00:01:48,590 --> 00:01:49,640 It's a little bit boring. 30 00:01:50,270 --> 00:01:52,280 I'm going to create them as a public function. 31 00:01:52,340 --> 00:01:57,200 And after that, we're going to what when we finish, when we know that working, we're going to just 32 00:01:57,200 --> 00:01:58,430 move them in the private part. 33 00:01:58,840 --> 00:02:05,660 OK, now I'm just going to say format, format, let's say remaining. 34 00:02:06,440 --> 00:02:13,640 And that obviously will be for for the remaining text. 35 00:02:13,640 --> 00:02:13,940 Right. 36 00:02:14,360 --> 00:02:17,840 So I'm just going I told you, we are going to do two functions for this one. 37 00:02:18,020 --> 00:02:18,410 For this one. 38 00:02:18,410 --> 00:02:21,650 I just want to when we have a thousands like this, I want a comma here. 39 00:02:21,980 --> 00:02:25,600 Two thousand two comma 500. 40 00:02:25,730 --> 00:02:25,970 Right. 41 00:02:26,480 --> 00:02:27,080 Oh, here. 42 00:02:27,080 --> 00:02:34,520 I need to pass in a parameter and let's test it out if it's working comes a lot. 43 00:02:36,350 --> 00:02:36,680 No. 44 00:02:37,400 --> 00:02:38,690 OK, one more thing. 45 00:02:38,810 --> 00:02:42,320 I just delete all of the comments before for this date. 46 00:02:42,320 --> 00:02:42,660 Right. 47 00:02:42,800 --> 00:02:46,340 If you look at a little bit, you'll see that there are no no comments. 48 00:02:46,340 --> 00:02:46,690 Right. 49 00:02:46,700 --> 00:02:50,930 That's not good for me because I don't want to see that code so messed up. 50 00:02:50,930 --> 00:02:57,110 So, Apu, I controller and I can ask I can access not formatting because it's public. 51 00:02:57,560 --> 00:02:58,310 Let's put it here. 52 00:02:58,310 --> 00:03:00,830 One thousand five to zero. 53 00:03:01,580 --> 00:03:07,050 And here is we're getting that output because we are controlling life. 54 00:03:07,100 --> 00:03:08,720 OK, I don't need this actually. 55 00:03:08,960 --> 00:03:11,030 So what is the idea here? 56 00:03:11,210 --> 00:03:17,240 I will use string substract method in the syntaxes stream. 57 00:03:18,650 --> 00:03:25,750 So any stream that we're going to give it to here and as you be SDR, it takes two parameters. 58 00:03:25,750 --> 00:03:28,130 Start in length. 59 00:03:28,370 --> 00:03:28,750 Right? 60 00:03:28,910 --> 00:03:33,110 This one is required and this one is optional. 61 00:03:33,150 --> 00:03:38,470 Require one, specify the position from where to start the extraction. 62 00:03:38,480 --> 00:03:41,060 Now there are two functions similar. 63 00:03:41,390 --> 00:03:46,030 We have string substract and we have additional one string that. 64 00:03:49,950 --> 00:03:50,410 Just wait. 65 00:03:50,430 --> 00:03:52,420 I'm just going to create a variable, I'm going to tell you. 66 00:03:52,890 --> 00:03:58,230 So I'm going to create a variable screen name and that will be Hello World. 67 00:03:59,300 --> 00:03:59,590 Right. 68 00:03:59,760 --> 00:04:07,500 And screen name it will you can do substring or this one that we are going to use now. 69 00:04:07,500 --> 00:04:08,330 They are similar. 70 00:04:08,850 --> 00:04:09,450 Yeah. 71 00:04:09,510 --> 00:04:10,650 But there is a slight difference. 72 00:04:11,160 --> 00:04:18,810 This the first one function returns a specified number of characters from the specified index. 73 00:04:19,390 --> 00:04:19,820 Right. 74 00:04:20,340 --> 00:04:23,180 And that is what we need in our case. 75 00:04:23,190 --> 00:04:24,960 So don't confuse those two are not. 76 00:04:24,960 --> 00:04:28,740 See now the index of the first character is zero. 77 00:04:29,190 --> 00:04:35,130 If the start of the parameter is positive or greater than or equal to the length of the string, then 78 00:04:35,130 --> 00:04:37,470 this function will return an empty string. 79 00:04:37,770 --> 00:04:44,370 If the start parameter is negative, then this function uses it is as an index from the end of the string 80 00:04:44,370 --> 00:04:45,850 and you will know what I'm trying to say. 81 00:04:46,140 --> 00:04:48,000 So then the second parameter is optional. 82 00:04:48,120 --> 00:04:51,120 You specify the number of characters you will extract. 83 00:04:51,330 --> 00:04:54,000 If not pass, it will extract the whole string. 84 00:04:54,420 --> 00:04:58,780 So if we don't specify this one, we will just give you this one. 85 00:04:59,910 --> 00:05:01,260 So that's not what we want. 86 00:05:01,290 --> 00:05:02,960 OK, here, let's start using this. 87 00:05:04,020 --> 00:05:04,680 So string name. 88 00:05:04,680 --> 00:05:05,390 This is just the test. 89 00:05:05,400 --> 00:05:06,000 Don't worry about you. 90 00:05:06,000 --> 00:05:08,670 Don't have to write it in. 91 00:05:08,670 --> 00:05:09,030 I'm sorry. 92 00:05:09,030 --> 00:05:10,860 I'm telling you just this right now. 93 00:05:11,100 --> 00:05:16,500 So cancel the log and we're going to say string name Dot 94 00:05:19,620 --> 00:05:25,320 and we are going to say zero and comma three. 95 00:05:25,560 --> 00:05:32,640 So this zero will start from the zero from because as I told you, you specify the position. 96 00:05:32,640 --> 00:05:39,320 And if the index or the first character is always zero, so this is zero zero one the same as I'm there 97 00:05:39,340 --> 00:05:43,770 right now, this will should give me this zero one to. 98 00:05:43,800 --> 00:05:44,220 Right. 99 00:05:44,880 --> 00:05:46,200 And he should give me help. 100 00:05:47,040 --> 00:05:54,330 And if I access this one, OK, it doesn't matter because we're not bringing up that anything. 101 00:05:54,490 --> 00:05:59,670 So it will give me a hell if I go to number four it will give me a real help and. 102 00:06:01,500 --> 00:06:07,070 So I'm going up arrow arrows and it will give me what I have typed last, so help. 103 00:06:07,940 --> 00:06:14,730 OK, now you know how this abstraction works, but how are we going to use this for our coding? 104 00:06:14,910 --> 00:06:15,860 OK, one more. 105 00:06:15,900 --> 00:06:23,250 We know that we can get the length of string and that string name, for example, that length. 106 00:06:23,940 --> 00:06:33,030 And if we type it down now lot the length string should give me some 11 or 12 characters, probably 107 00:06:34,440 --> 00:06:36,300 11 right now. 108 00:06:36,300 --> 00:06:42,750 If I go here until 10, I would expect to have the string, this whole string back except for the D 109 00:06:44,250 --> 00:06:46,570 areas it's working right now. 110 00:06:46,590 --> 00:06:48,750 We're going to use this length in our core. 111 00:06:48,780 --> 00:06:50,320 So this is pretty much done. 112 00:06:50,810 --> 00:06:54,660 I'm going to kill it and I'm going to say syntax. 113 00:06:54,840 --> 00:06:57,090 You will need only this, right? 114 00:06:57,240 --> 00:07:00,300 So here I just want this. 115 00:07:00,330 --> 00:07:07,670 Whatever we pass here doesn't matter if it's if it's not if it's string or not. 116 00:07:07,680 --> 00:07:14,290 I just want to use number to be equal to math that round now. 117 00:07:14,310 --> 00:07:18,240 And I'm going to pass this number again and I'm saving again in the same variable. 118 00:07:18,240 --> 00:07:19,050 And I can do that. 119 00:07:19,380 --> 00:07:19,770 Right. 120 00:07:19,960 --> 00:07:20,660 I can do that. 121 00:07:20,670 --> 00:07:21,750 No, no problem. 122 00:07:22,190 --> 00:07:27,030 OK, so what I'm doing this because we because we're dealing with decimals here. 123 00:07:27,240 --> 00:07:28,880 When we add we can add decimals. 124 00:07:28,890 --> 00:07:30,870 Fifty five or five for example. 125 00:07:31,110 --> 00:07:35,350 And I don't want to decimals here, I just want to have the same round number. 126 00:07:35,520 --> 00:07:43,140 OK, now in order to use the string, for example, I am going to convert this number to string using 127 00:07:43,140 --> 00:07:46,200 number two. 128 00:07:49,040 --> 00:07:57,920 So I'm going to use this function to string oops and let's count a lot now the number. 129 00:08:01,860 --> 00:08:03,540 So you should give me back spring, right? 130 00:08:04,470 --> 00:08:10,030 So I'm going to go back here isn't passing a no and yeah, it's giving me strength. 131 00:08:11,310 --> 00:08:11,970 How cool is this? 132 00:08:13,170 --> 00:08:24,690 So what I can do now is actually I can say that I've no, that length is greater than three means that 133 00:08:24,690 --> 00:08:31,350 if I have a number with number, it will be equal to one thousand five hundred and twenty. 134 00:08:32,040 --> 00:08:36,510 So the length is greater than three and it's four actually right here. 135 00:08:36,940 --> 00:08:42,240 And what it will go here and say comes along. 136 00:08:44,660 --> 00:08:54,590 OK, right, let's just as all else becomes a lot smaller then. 137 00:08:59,620 --> 00:09:04,240 Okay, well, it's just this is this is working our logic, so I'm just going to copy here. 138 00:09:04,430 --> 00:09:08,150 You should give me a key and this should not give me OK, right. 139 00:09:08,330 --> 00:09:09,410 Smaller than thousand. 140 00:09:09,680 --> 00:09:10,550 Not so. 141 00:09:10,550 --> 00:09:13,070 Our logic is working if the length is greater than three. 142 00:09:13,310 --> 00:09:15,110 So do whatever you want here. 143 00:09:15,500 --> 00:09:17,790 But we want this now. 144 00:09:17,850 --> 00:09:21,790 So I'm just going to call that the entire thing and I'm just going to split this one. 145 00:09:21,950 --> 00:09:24,050 So I'm going to use the substract. 146 00:09:26,570 --> 00:09:31,400 And what I'm going to see here, I'm going to start from the first position and I'm going to say no 147 00:09:32,900 --> 00:09:40,320 that length minus three, and I'm going to concatenate this with a comma, right. 148 00:09:41,270 --> 00:09:43,960 OK, just bear with me and we have one more. 149 00:09:44,840 --> 00:09:56,030 No, not substract no length minus three to start from there and to go until the end. 150 00:09:56,880 --> 00:09:57,820 OK. 151 00:09:58,160 --> 00:10:03,710 No, I am going to cancel lot this number here. 152 00:10:06,020 --> 00:10:07,120 So what will happen. 153 00:10:07,130 --> 00:10:07,640 What you think 154 00:10:10,430 --> 00:10:11,060 it is. 155 00:10:11,270 --> 00:10:14,920 Our function is working, but how we get there. 156 00:10:15,110 --> 00:10:17,540 How did you how did we solve this. 157 00:10:17,990 --> 00:10:21,710 OK, the first part I'm just going to show to you the first part. 158 00:10:21,710 --> 00:10:23,140 What is this part doing? 159 00:10:23,690 --> 00:10:29,170 So that's why we are using the that's why we are using these substract. 160 00:10:29,540 --> 00:10:37,010 So I'm saying that you should start from zero and then the length should go to minus three. 161 00:10:37,700 --> 00:10:43,130 So that means you should go to zero in the lengths you go minus three. 162 00:10:43,130 --> 00:10:48,920 And the length for this one is for one, two, three, and it's finishing here. 163 00:10:49,250 --> 00:10:52,610 That why this part will give me only one. 164 00:10:54,140 --> 00:10:59,550 So I'm trying to get the number one here from this one thousand five hundred and twenty. 165 00:10:59,900 --> 00:11:00,490 Here it is. 166 00:11:00,500 --> 00:11:05,170 I get the one because I'm seeing start from start from zero here. 167 00:11:05,420 --> 00:11:07,520 But the length go minus three. 168 00:11:07,880 --> 00:11:10,700 So the length was four, now it's one. 169 00:11:10,880 --> 00:11:14,150 So I'm getting the first one right in while I'm using this minus four. 170 00:11:14,160 --> 00:11:17,290 You will see now how I get the second part. 171 00:11:17,570 --> 00:11:20,180 So the comma, I just add this comma here. 172 00:11:20,480 --> 00:11:23,630 Right, I just concatenate what I have here. 173 00:11:24,260 --> 00:11:29,810 Now the last part is OK, I just copy something else. 174 00:11:32,590 --> 00:11:40,700 So the next part, ok, I'm saying start from minus three and that minus three will go zero one three. 175 00:11:40,890 --> 00:11:46,040 So start from five and go until the end in three more positions. 176 00:11:46,040 --> 00:11:47,120 One, two, three. 177 00:11:47,510 --> 00:11:47,910 Right. 178 00:11:48,080 --> 00:11:50,060 So that should give me five twenty. 179 00:11:50,660 --> 00:11:51,620 That is the logic. 180 00:11:51,620 --> 00:11:56,500 But you're going to see, OK, how this will work with more than thousands. 181 00:11:56,510 --> 00:11:56,850 Right. 182 00:11:57,200 --> 00:11:58,310 Here it is now. 183 00:11:58,310 --> 00:11:58,940 I have one. 184 00:11:58,940 --> 00:11:59,960 I have five twenty. 185 00:12:00,200 --> 00:12:02,720 And I concatenate this comma here. 186 00:12:03,290 --> 00:12:09,710 But what if I have like what if I have fifteen thousand two hundred. 187 00:12:10,460 --> 00:12:10,850 Right. 188 00:12:11,090 --> 00:12:12,380 It will still work. 189 00:12:12,380 --> 00:12:12,880 Why? 190 00:12:13,070 --> 00:12:19,820 Because I always get this go three times back and after that go until the end. 191 00:12:20,840 --> 00:12:21,290 Right. 192 00:12:21,620 --> 00:12:26,120 Any and I'm saying here, OK, start from zero and go three times. 193 00:12:26,300 --> 00:12:30,600 So it's one, two, three. 194 00:12:30,740 --> 00:12:32,570 That's why the 15 is going there. 195 00:12:33,590 --> 00:12:35,090 That's why this one is left. 196 00:12:35,250 --> 00:12:37,310 So 15 and 20 is left. 197 00:12:37,520 --> 00:12:41,690 So because I'm going from the first position, but I'm seeing here start minus three. 198 00:12:41,870 --> 00:12:44,680 And when you do, minus three is going to left you with fifteen. 199 00:12:44,870 --> 00:12:47,990 So one five will be subtracted from the real screen. 200 00:12:48,230 --> 00:12:57,320 So I hope you understand this point and I hope I just manage to explain it in the other part will be 201 00:12:57,320 --> 00:12:58,550 exactly the same. 202 00:13:00,050 --> 00:13:10,970 But we have a slightly different format, calories, OK, it will still take a number and we will still 203 00:13:10,970 --> 00:13:11,600 use this one. 204 00:13:11,870 --> 00:13:12,230 Right. 205 00:13:12,230 --> 00:13:14,270 But here we are going to do a couple of changes. 206 00:13:14,900 --> 00:13:17,120 We want a decimals in. 207 00:13:17,240 --> 00:13:21,950 First, I'm going to do instead of a round, I'm going to use the absolute. 208 00:13:22,220 --> 00:13:28,360 So that will give me the Maddog APS function returns the absolute value of numbers. 209 00:13:28,370 --> 00:13:30,340 If it's negative, it's going to return to a positive. 210 00:13:31,130 --> 00:13:42,320 So now next, what we need to do is actually to use to fixed and we need to specify how much to for 211 00:13:42,320 --> 00:13:50,150 example, this method is of a number of product and this put two decimal numbers in round. 212 00:13:50,540 --> 00:13:52,850 So actually in round that number. 213 00:13:53,300 --> 00:13:58,970 So we have now a number that is string, but it's not actual number. 214 00:13:58,970 --> 00:13:59,260 Right. 215 00:13:59,600 --> 00:14:07,670 So what we can do I'm just going to comment this out and actually we're not going to need this or else. 216 00:14:08,030 --> 00:14:08,380 Right. 217 00:14:08,390 --> 00:14:09,350 We're not going to use it. 218 00:14:09,680 --> 00:14:13,660 So cancel the number. 219 00:14:14,840 --> 00:14:15,350 Very good. 220 00:14:15,350 --> 00:14:16,850 So I'm going to call this function. 221 00:14:16,850 --> 00:14:25,220 Now, if you are a controller that this and let's say one thousand five hundred and twenty. 222 00:14:26,780 --> 00:14:29,730 And here is it, put two decimal spaces there. 223 00:14:30,240 --> 00:14:30,590 Cool. 224 00:14:31,340 --> 00:14:37,290 Now, what we need to do is actually to use the split now, so I'm going to use the split. 225 00:14:37,310 --> 00:14:43,790 Now, remember, we do have this at zero and we use the split with the for the dash. 226 00:14:43,820 --> 00:14:50,120 Now we're going to use the split four when we have this something like this. 227 00:14:50,120 --> 00:14:50,320 Right. 228 00:14:50,330 --> 00:14:51,600 Or 55 it can be. 229 00:14:51,980 --> 00:14:53,630 So we going to use the split there. 230 00:14:54,560 --> 00:14:56,740 OK, so you already know this function. 231 00:14:56,750 --> 00:14:58,910 We have to use it and I'm going to say split. 232 00:15:01,120 --> 00:15:02,500 Every no. 233 00:15:03,640 --> 00:15:04,840 Why is this one? 234 00:15:05,200 --> 00:15:06,130 Why this name? 235 00:15:06,130 --> 00:15:08,820 Because the split will return missionary, right? 236 00:15:09,070 --> 00:15:10,900 Some no, not split. 237 00:15:11,990 --> 00:15:19,690 And I'm going to say that that should be the split part in the first integer. 238 00:15:21,670 --> 00:15:24,130 I will say split array. 239 00:15:28,010 --> 00:15:29,310 And I'm going to say zero. 240 00:15:29,330 --> 00:15:32,400 That will be the first integer in the decimal part. 241 00:15:32,660 --> 00:15:35,060 It will be split, that one. 242 00:15:36,130 --> 00:15:41,900 All right, because this, ladies and gentlemen, will turn me on every week. 243 00:15:42,950 --> 00:15:51,080 For example, if we give this number right, if we give this number, it will return me. 244 00:15:51,450 --> 00:15:57,320 So it will return me this number as a first integer is the first every element of the error and the 245 00:15:57,320 --> 00:16:03,190 two decimal points, the two decimal points will be second part of the area. 246 00:16:03,350 --> 00:16:05,410 And that's why I get it with number one. 247 00:16:05,450 --> 00:16:06,410 That's the index. 248 00:16:07,400 --> 00:16:08,350 OK, done. 249 00:16:09,800 --> 00:16:14,180 So that sounds a lot deathstar of logic. 250 00:16:15,900 --> 00:16:21,900 First, and it comes of the decimal part. 251 00:16:25,710 --> 00:16:30,990 And I'm just going to put all of the variables on top here, so I'm going to have this one. 252 00:16:33,050 --> 00:16:33,990 Fifty five. 253 00:16:35,390 --> 00:16:37,940 And here it is said, give me 15. 254 00:16:37,970 --> 00:16:40,070 Fifty five in the decimal part is there. 255 00:16:41,180 --> 00:16:46,730 So what I'm going to use now so I'm going to use the same logic from here. 256 00:16:47,510 --> 00:16:48,290 Just kind on comment. 257 00:16:48,300 --> 00:16:49,430 This one else. 258 00:16:49,440 --> 00:16:50,300 We don't need it. 259 00:16:50,600 --> 00:16:52,270 I do have the same number. 260 00:16:52,460 --> 00:16:53,870 I do have the same length. 261 00:16:54,320 --> 00:16:58,550 I'm going to do exactly the same because I'm going to add the comma there. 262 00:16:59,090 --> 00:17:06,050 OK, but now after this is done, because this is going to return me, 263 00:17:09,230 --> 00:17:12,900 it's going to return a value here and I'm going to show it. 264 00:17:12,920 --> 00:17:14,240 It is going to return. 265 00:17:15,460 --> 00:17:18,380 Um, actually, we're not going to return it here. 266 00:17:19,070 --> 00:17:20,480 We're going to return it in the end. 267 00:17:21,170 --> 00:17:23,510 But what we can do is I'm going to say formatter. 268 00:17:26,700 --> 00:17:34,020 Formatted text or formatted number, and that will be equal to first int plus. 269 00:17:36,280 --> 00:17:41,840 Got that small part right, how this will look. 270 00:17:42,580 --> 00:17:52,810 We will say council block the four minute number, because I do have this first and I do have this. 271 00:17:53,440 --> 00:17:55,150 And let's see what will happen. 272 00:17:55,150 --> 00:17:55,540 Right. 273 00:17:56,140 --> 00:18:00,320 Instead of number here, we need to just change the first. 274 00:18:01,420 --> 00:18:01,830 Right. 275 00:18:04,930 --> 00:18:06,910 Actually, we don't need all this. 276 00:18:07,270 --> 00:18:13,810 I just need these first end to be replaced with the number, right, because we don't have a number 277 00:18:13,810 --> 00:18:14,080 here. 278 00:18:14,080 --> 00:18:14,740 We change it. 279 00:18:15,100 --> 00:18:18,610 We use that number to get the split it into two parts. 280 00:18:19,240 --> 00:18:25,710 OK, now let's call this function again hit enter in. 281 00:18:25,780 --> 00:18:26,890 This is what I got. 282 00:18:27,040 --> 00:18:27,430 Right. 283 00:18:27,670 --> 00:18:33,040 So it split the first one, split the second one and that comma from here. 284 00:18:33,880 --> 00:18:38,550 And after that I just add those number because it saved back in the first. 285 00:18:39,250 --> 00:18:46,870 So the commas there actually now and I just attach this, I mean, concatenate with the dot decimal 286 00:18:46,870 --> 00:18:52,810 point and that's it's pretty much now how are we going to write this one inside our public? 287 00:18:52,810 --> 00:18:54,150 So it is working now. 288 00:18:54,610 --> 00:18:58,810 I'm just going to get rid of this before I do that. 289 00:18:58,810 --> 00:19:05,560 Let's create a variable here and let's put it split or a number. 290 00:19:05,710 --> 00:19:06,880 Let's first. 291 00:19:07,980 --> 00:19:17,080 And then I do have the small part, then I do have for my number, and I think we have done. 292 00:19:17,400 --> 00:19:19,950 Now I'm going to copy this. 293 00:19:19,950 --> 00:19:27,290 I'm going to cut actually this function and I'm going to private above it and I'm going to put it here. 294 00:19:28,110 --> 00:19:30,300 I need to change, obviously, things. 295 00:19:31,320 --> 00:19:33,840 So that will be equal to what? 296 00:19:34,230 --> 00:19:38,300 That will be equal to function. 297 00:19:38,310 --> 00:19:38,760 Right. 298 00:19:39,000 --> 00:19:41,010 So that will be equal to a function. 299 00:19:41,430 --> 00:19:43,450 It should be or should be semicolon. 300 00:19:43,860 --> 00:19:49,170 OK, and we not instead of cancelling Locke, you should return this form. 301 00:19:49,170 --> 00:19:50,790 It is no good. 302 00:19:51,480 --> 00:19:52,810 So we're returning this. 303 00:19:52,830 --> 00:19:54,740 OK, let's fix this face here. 304 00:19:55,110 --> 00:20:04,980 I think we are done and let's right here format calories for the front. 305 00:20:05,490 --> 00:20:07,370 You are very good. 306 00:20:07,650 --> 00:20:09,630 Now we have one more. 307 00:20:10,450 --> 00:20:11,010 The first one. 308 00:20:11,010 --> 00:20:11,810 The remaining one. 309 00:20:11,820 --> 00:20:15,300 I'm just going to cut the entire thing and we're going to clean this here. 310 00:20:18,280 --> 00:20:28,980 And we've got pasta here and this should be equal and these should be stored in a variable that, oh, 311 00:20:28,990 --> 00:20:29,990 it should not be sorted. 312 00:20:30,340 --> 00:20:30,940 Don't worry about it. 313 00:20:31,630 --> 00:20:33,460 So what else? 314 00:20:34,160 --> 00:20:35,410 I need to do this. 315 00:20:35,710 --> 00:20:37,060 To do this. 316 00:20:37,400 --> 00:20:43,630 And also, we also need to instead of counseling love, there's no need to return it. 317 00:20:44,920 --> 00:20:46,840 And semicolon here, by the way. 318 00:20:46,850 --> 00:20:47,470 Sorry, guys. 319 00:20:49,450 --> 00:20:53,500 Return the no. 320 00:20:53,500 --> 00:20:55,810 OK, no, cut that space. 321 00:20:56,210 --> 00:21:00,610 I think we are done here and I need to add some comment here. 322 00:21:00,790 --> 00:21:08,470 Format remaining chart that is remaining. 323 00:21:09,190 --> 00:21:13,520 Galeries in our graph chart. 324 00:21:14,500 --> 00:21:17,470 OK, now how where are we going to use this. 325 00:21:17,680 --> 00:21:22,540 So I'm going to just try to keep this lecture as it is. 326 00:21:23,320 --> 00:21:28,330 We need to add them in this item and display front calories and we have done well. 327 00:21:28,360 --> 00:21:32,410 I'm going to do that one in the next lecture because it's going to take too much time. 328 00:21:32,410 --> 00:21:33,400 And I don't want to bother you. 329 00:21:33,500 --> 00:21:33,850 Right. 330 00:21:33,880 --> 00:21:35,010 So I'll see you in the next one.