Using Python Factors of a number. Write a program that: - asks the user for a
Fantastic news! We've Found the answer you've been seeking!
Question:
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.
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Posted Date: