00:01
Okay, this question says, use python, write a function that takes a list of integers l and an integer n.
00:09
The function returns the absolute value of the sum of the every other end element of l.
00:16
Make sure not to use an index outside the possible locations within l.
00:21
Okay, so let's do l, it's a list of integers.
00:23
So let's just get at that.
00:27
I'll just keep to that.
00:29
10 is going to be whatever.
00:34
Let's make it two.
00:36
So let's do we want what we want.
00:39
We want the absolute value of the sum.
00:41
So let's do total equals zero at first.
00:47
And we'll say 4i in range len l and we're going to stride that by n.
01:03
We're going to say we're going to i just noticed that i have an extra four and an extra comma there.
01:14
So we're going to say total plus equals i, or l -i rather.
01:28
So let's, nl, sorry...