1 00:00:18,000 --> 00:00:25,020 Hello and welcome to the golden programming language course in the previous session, we talked about 2 00:00:25,020 --> 00:00:29,970 creative stories using this nicely try and indecision. 3 00:00:30,000 --> 00:00:33,000 We want to talk about the other slices concept. 4 00:00:37,650 --> 00:00:40,230 Create a slice using an array. 5 00:00:42,450 --> 00:00:49,530 As beyond, and in no doubt, this lies is the reference of the NRA, so you can create this lines from 6 00:00:49,530 --> 00:00:54,210 the given Harry for creating a sly spin on the given Harry. 7 00:00:54,480 --> 00:01:01,770 First, you need to specify the lower and upper bound, which means a slice can take elements from the 8 00:01:01,770 --> 00:01:05,610 areas starting from the lower bound to the upper bound. 9 00:01:06,060 --> 00:01:15,540 It does not include the elements about from the upper bound, as shown in the below syntax new lines. 10 00:01:15,810 --> 00:01:23,210 Column equals calls add a name and Esquire brackets low column high. 11 00:01:23,220 --> 00:01:25,830 These think tanks will return a new and slice. 12 00:01:27,540 --> 00:01:33,870 The default value of the lower bound is zero and the default value of the upper bound is the total number 13 00:01:33,870 --> 00:01:36,390 of the elements present in the given area. 14 00:01:37,710 --> 00:01:45,630 Now go to be a good program to illustrate how to create the slices from the array first created at a 15 00:01:46,230 --> 00:01:46,650 high rate. 16 00:01:47,870 --> 00:01:56,720 Column he calls this group where I could sit five for the last and tight end and Inshallah is the value 17 00:01:57,680 --> 00:02:01,070 on two, three, four and five. 18 00:02:02,930 --> 00:02:09,500 Now we want to create some slices from the given at a first, create a slice by the vacuole. 19 00:02:09,890 --> 00:02:15,050 Go to the next line for the example that is slice one. 20 00:02:17,840 --> 00:02:30,590 He calls early S-Corp bracket one, Colleen two, and create either a slices by shorthand declaration 21 00:02:31,010 --> 00:02:42,830 for the example slice two columns equals Rey high square bracket zero column. 22 00:02:43,400 --> 00:02:53,120 And in the next line, they slice three column equals a square bracket. 23 00:02:53,450 --> 00:02:55,190 Column two. 24 00:02:56,090 --> 00:03:06,590 And in the next line is slice for column equals every square brackets and set just column. 25 00:03:08,010 --> 00:03:18,680 Now displayed, they created Annie and Slices by the following codes for the example RFP array. 26 00:03:19,320 --> 00:03:22,140 Colin said the variable array 27 00:03:24,900 --> 00:03:32,040 FP slice from Colin and said the variable as low as far 28 00:03:34,890 --> 00:03:54,700 as close to column and slice two and displays a slice three, sets the variable slice three and pins 29 00:03:55,390 --> 00:04:04,440 a slice for column and set the variable slice for save the project. 30 00:04:05,610 --> 00:04:07,080 Now execute the code. 31 00:04:12,150 --> 00:04:14,940 OK, we can see the output. 32 00:04:15,180 --> 00:04:22,680 First, we print the created array, which contains the values one, two five and then a slice vong, 33 00:04:22,950 --> 00:04:30,660 which is Thors, the first index of the array and contains the value to then a slice to each contains 34 00:04:30,660 --> 00:04:32,640 the index zero to the end. 35 00:04:32,790 --> 00:04:35,940 Nic stopped at eight and hold the values one to five. 36 00:04:36,240 --> 00:04:43,080 Now Slice three, which contains the zero index of the array to the second index and holds the value 37 00:04:43,080 --> 00:04:43,950 von N2. 38 00:04:44,640 --> 00:04:51,440 And finally, the force is nice that holds all the values of the ADI and we could define the slices 39 00:04:51,450 --> 00:04:52,850 using array. 40 00:04:53,700 --> 00:04:59,100 In order not to prolong the time of decision, we will finish it and we will continue the content in 41 00:04:59,100 --> 00:04:59,970 the next session. 42 00:05:00,150 --> 00:05:00,570 Goodbye.