Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions easyPythonpi/easyPythonpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down