Question: Problem 3 . 6 ( 1 0 pts ) The proper factors of a number are all of the factors other than the number itself.

Problem 3.6(10 pts) The proper factors of a number are all of the factors other than the number itself. For instance,
the factors of 10 are 1,2,5, and 10, but the proper factors of 10 are only 1,2, and 5. Every number can be classified
as abundant, deficient, or perfect, according to the following definitions:
Abundant: The sum of the proper factors is greater than the number itself.
Deficient: The sum of the proper factors is less than the number itself.
Perfect: The sum of the proper factors is equal to than the number itself.
Define a function named exactly classify. Your function should take one argument and display a string to
classify each number in the inclusive range 2 to the given input as abundant, deficient or perfect using the
format "value is ________". Your string must match the given examples' format, no partial credit for output that
does not match.
Examples:
>>> classify(25)
2 is deficient
3 is deficient
4 is deficient
5 is deficient
6 is perfect
7 is deficient
8 is deficient
9 is deficient
10 is deficient
11 is deficient
12 is abundant
13 is deficient
14 is deficient
15 is deficient
16 is deficient
17 is deficient
18 is abundant
19 is deficient
20 is abundant
21 is deficient
22 is deficient
23 is deficient
24 is abundant
25 is deficient

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 Programming Questions!