programming-examples/python/Math/Find out, if the given number is abundant.py
2019-11-15 12:59:38 +01:00

5 lines
170 B
Python

def is_abundant(n):
fctr_sum = sum([fctr for fctr in range(1, n) if n % fctr == 0])
return fctr_sum > n
print(is_abundant(12))
print(is_abundant(13))