00:01
Hello, welcome to this lesson.
00:02
In this list we have a jaggle program that would let us output the middle number or the middle value in a list.
00:15
So here user would input some values, then we would actually show the middle number.
00:23
The last number of the list is actually negative 1.
00:28
So it means when user in test negative 1, that should be the end of the list.
00:34
Alright, so let's go on.
00:40
I think they will say system, we show them prompts.
00:51
Say enter your values for the list and with negative one.
01:18
So i'll create a holder.
01:23
Let's say list.
01:26
Then that would be this kind of that we have.
01:32
We use this color to get the inputs so say scala nest okay then again i'll create a list that will actually the list that we have was splattered based on the commas that we have so for example if they enter 4, 6, 7 negative 1 we will split it based on the comma all right so we have one two three four split it based on a comma and that one will be a list on his own so i'll say string well first of all be a string then we converted to an integer list which would be equal to the list and split so we split by a comma so at this point at this point i will do for a use of four in order to enter these values.
03:10
The ones that i have in this array which are strings, i'll convert them to integers and put them in the user values.
03:22
So i'll say 4 equals to 0, less than the dot length.
03:48
Okay, so with this one, i'll simply have an integer, i'll call it value, which will be called to, so i'll say integer.
04:02
Pass integer, now put in the value that i will get from the i split.
04:12
So i'm going to trim it to make sure that the leading spaces are off.
04:24
Alright, after that i'll store it into the user values.
04:35
So i'll say user values...