Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find average with sum and len in python

# Python code to demonstrate the practical application
# of sum()
  
numbers = [1,2,3,4,5,1,4,5]
  
# start = 10
Sum = sum(numbers)
average= Sum/len(numbers) 
print (average)

# Output -
# 3
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #find #average #sum #len #python
ADD COMMENT
Topic
Name
3+7 =