python program to find sum of factors of a number code example
Example 1: factors addition in pyhone
def factor(num):
factor = [1]
for i in range(2,num+1):
if num%i==0:
factor.append(i)
return sum(factor)
Example 2: factors addition in pyhone
print(factor(30))