Commit 63d99622 authored by Michael Krause's avatar Michael Krause 🎉
Browse files

Add factorial

parent 906df5c5
......@@ -11,3 +11,9 @@ def pi(n):
pi -= (-1)**(i) * 4/j
j += 2
return pii
def factorial(n):
r = 1
for i in range(n+1):
r *= i
return r
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment