+ 2
Calculating average in python using a function.
How do i create a while loop function that keeps adding numbers entered by the user, adding them then outputing the average?
1 ответ
+ 2
Here's a way:
#Get user input and insert it into a list
#Calculate the sum of list by the builtin function sum()
#Calculate the number of elements in the list by the builtin function len()
#divide the sum by the len
*try to do it and let me know if you get stuck at any point