Question: An abundant number is a positive integer for which the sum of its proper divisors ( all divisors excluding itself ) is strictly greater than

An abundant number is a positive integer for which the sum of its proper divisors (all divisors excluding itself) is strictly greater than the number itself.
Example: 12 is divisible by 1,2,3,4, and 6
1+2+3+4+6=16, and now 16>12, so 12 is abundant number.
Example: 9 is divisible by 1 and 3
1+3=4, and now 49, so 9 is not an abundant number.
Example: 6 is divisible by 1,2 and 3
1+2+3=6, and now 6=6, so 6 is not an abundant number.
Write a function print_abundant(n) that prints first n abundant numbers, where n is the parameter given by the user.
def print_abundant (n) :
Sample Outputs:
print_abundant(2)-> prints 12,18
print_abundant(6)-> prints 12,18,20,24,28,30
print_abundant(9)-> prints 12,18,20,24,28,30,36,40,42
Note: You do not need to return anything from the function, just have it print directly.
 An abundant number is a positive integer for which the sum

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!