Code:
# count the divisors of a number
def countDivisors(n):
count = 0
for possible in range(1, n):
if n % possible == 0:
count = count+possible
# print Perfect if sum of divisors it equal to dividen
if count == n:
print n
Comment