diff --git a/easyPythonpi/easyPythonpi.py b/easyPythonpi/easyPythonpi.py index 003b874..f094a17 100644 --- a/easyPythonpi/easyPythonpi.py +++ b/easyPythonpi/easyPythonpi.py @@ -24,6 +24,14 @@ def factorial(n): # To find the factorial of 2 numbers # single line to find factorial return 1 if (n == 1 or n == 0) else n * factorial(n - 1) +# To compute the factord of the argument passed +def factors(n): + factors = [] + for i in range(1, n+1): + if n % i == 0: + factors.append(i) + return factors + def Area_circle(r): # To find the area of a circle using the radius r PI = 3.142 return PI * (r * r)