Do you think that will be fine? It seems like he would have made it clearer if that was the case. Right? I am not too sure... I am very new at this.
Printable View
Do you think that will be fine? It seems like he would have made it clearer if that was the case. Right? I am not too sure... I am very new at this.
When you calculate an average, it's easier (but not necessary) to compute the sum, and only then divide by the number of elements, once. BTW, you've written the function to assume that the number of elements is 5. You could pass the number of elements as another argument, and then divide by whatever it is.