Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find sum of factors of a number python

def sumFactors(n):
    return sum(d for d in range(1, n) if n%d == 0)
 
PREVIOUS NEXT
Tagged: #find #sum #factors #number #python
ADD COMMENT
Topic
Name
9+9 =