- Related Questions & Answers
- Find minimum sum of factors of number using C++.
- Find sum of even factors of a number using C++.
- Find sum of odd factors of a number using C++.
- Python Program for Find minimum sum of factors of number
- How to find prime factors of a number in R?
- Python Program for Find sum of even factors of a number
- Python Program for Find sum of odd factors of a number
- Find sum of even factors of a number in Python Program
- Find all prime factors of a number - JavaScript
- C++ Program to find sum of even factors of a number?
- Java Program to find minimum sum of factors of a number
- Java Program to Find sum of even factors of a number
- To find sum of even factors of a number in C++ Program?
- C Program to Find the minimum sum of factors of a number?
- Java Program to find Product of unique prime factors of a number

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

In order to find factors of a number, we have to run a loop over all numbers from 1 to itself and see if it is divisible.

num=int(input("enter a number")) factors=[] for i in range(1,num+1): if num%i==0: factors.append(i) print ("Factors of {} = {}".format(num,factors))

If i is able to divide num completely, it is added in the list. Finally the list is diaplayed as the factors of given number

enter a number75 Factors of 75 = [3, 5, 15, 25, 75]

Advertisements