Nov-11-2017, 08:32 PM
Well, first you have to create a variable which will hold the incrementing sum as you loop over the list. So:
This is a pretty basic usage of a loop so I doubt that you will face some obstacles.
Another thing. You are calling the scorecalculator() function inside the while loop. Also, you have to assign the returned result to a variable because the function just returns something but this object is never used.
1 2 3 4 |
sum = 0 For each number in the list : add the number to the sum Then return the average |
Another thing. You are calling the scorecalculator() function inside the while loop. Also, you have to assign the returned result to a variable because the function just returns something but this object is never used.
1 |
var = func() |