Write a perfect som_div_function that takes a positive integer p as input and returns nothing. The function
Question:
Write a perfect som_div_function that takes a positive integer p as input and returns nothing. The function finds the sum of the divisors of p, tests, and displays a message about whether the integer p is perfect, abundant, or deficient. A number p is perfect if the sum of its divisors is equal to twice this number p, abundant if this sum is strictly greater than twice this number p, and deficient if the sum of its divisors is strictly less than twice this number p . For example, 6 is perfect, 18 is abundant, 8 is deficient. Add the type of contract in the comments.
Write the function som_div_parfaite that takes a positive integer p as input and returns nothing. The function finds the sum of the divisors of p, tests, and displays a message stating whether the integer p is perfect, abundant, or deficient.
A number p is perfect if the sum of its divisors is equal to twice that number p, abundant if this sum is strictly greater than twice this number p, deficient if the sum of its divisors is strictly less than twice this number p. For example, 6 is perfect, 18 is abundant, 8 is deficient. Add the type of contract as comments.