00:01
Okay, this question says, given to arrays of integer, a1 with at least one element, and a2 empty that same capacity of a1.
00:12
Copy every other element of a1, starting at 0 into a2, then copy the remaining elements.
00:26
Ah, i see.
00:31
I call to a method that prints the final array is already provided.
00:34
You may use any type of loops.
00:36
So let's use the example.
00:38
A1 is going to be equal to and let's import nnupi for arrays.
00:43
So let's do from numpi and 4 star.
00:49
And we'll say a1 is going to be an array with 10, 20, 30, 40, 50, 60.
00:59
And a2 is going to be an empty array, so empty.
01:05
And it's going to have like six.
01:07
22 is instantiated basically with whatever is already there.
01:13
Okay, so it wants us to start by doing every other number, so let's say 4i in range a1 lenn, a1 over 2.
01:29
We're going to do a2 i, and actually i'm going to do 2 times i.
01:37
You don't want to do every other number.
01:39
It's going to be equal to coffee of a1.
01:47
So, and we have to turn this into an integer, otherwise we can't loop over it.
01:58
So let's see what that gave up.
01:59
So right away, it doesn't look quite right, does it? so let's see what i is.
02:12
I is two.
02:13
So we should start at the zero.
02:18
And oh, this should be two times a i as well...