00:01
Okay, so in this problem, we're trying to find or create a function that finds the average of an array of 20 elements.
00:07
So to find the average of any set of numbers, you just need the sum of the numbers over the number of elements or number of numbers.
00:15
So in this case, we know the number is 20, as that is asked in the prompt.
00:21
So when we create the function, we need our only argument is the actual array.
00:28
And when we're trying to find the total, we actually just have to loop through the array and add each element.
00:36
So first to do that, or first we need to elicitize a variable sum takes this total.
00:45
So initialize it to zero.
00:46
Then we run through zero to 20, or zero to 19 actually because this is exclusive...