Question: Using Python Factors of a number. Write a program that: - asks the user for a number - the program should display all

Using Python Factors of a number.

Write a program that:

-   asks the user for a number

-   the program should display all positive factors of the number that is input.

o For instance, if the user inputs 100, all factors of 100 are displayed. The factors are: 1, 2, 4, 5, 10, 20, 25, 50, 100

o Similarly, if the user inputs 150, all factors of 150 are displayed. The factors are: 1, 2, 3, 5, 6, 10, 15, 25, 30, 50, 75, 150

-   Then, display a statement that how many factors have the number. For instance, ' The number 100 has 9 factors'

-   Then, display the top three factors, and the average of the top three factors.

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!