Write a Python program that prompts the user for an integer and then prints out all the perfect numbers up to that integ
Posted: Sun Jul 03, 2022 11:23 am
Write a Python program that prompts the userfor an integer and then prints out all the perfect numbers upto that integer.
For example, if the user enters 500, the program shouldprint628496
An integer n is considered perfect if it is equal to the sum of allits divisors, except for n itself. For example, 28 = 1 + 2 + 4+ 7 + 14
For example, if the user enters 500, the program shouldprint628496
An integer n is considered perfect if it is equal to the sum of allits divisors, except for n itself. For example, 28 = 1 + 2 + 4+ 7 + 14