Nov-11-2017, 02:24 AM
Hello!
It doesn't have to call sum() on each loop in the function. It doesn't need a loop at all. sum(list) will all the numbers in that list. Than divide the result to len(list).
Getting the scores... In Python when you want to loop certain times use the for loop. It is just for that.
It doesn't have to call sum() on each loop in the function. It doesn't need a loop at all. sum(list) will all the numbers in that list. Than divide the result to len(list).
Getting the scores... In Python when you want to loop certain times use the for loop. It is just for that.
for n in range(5): # do somethingThis will loop 5 times. You can use 'n' or not. In your case you don't need it.