aboutsummaryrefslogtreecommitdiff
path: root/comparison/Python/ack3-11.py
diff options
context:
space:
mode:
Diffstat (limited to 'comparison/Python/ack3-11.py')
-rw-r--r--comparison/Python/ack3-11.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/comparison/Python/ack3-11.py b/comparison/Python/ack3-11.py
new file mode 100644
index 0000000..3e831ac
--- /dev/null
+++ b/comparison/Python/ack3-11.py
@@ -0,0 +1,9 @@
+def ack(m,n):
+ if m==0:
+ return n+1
+ elif n==0:
+ return ack(m-1, 1)
+ else:
+ return ack(m-1, ack(m, n-1))
+
+print(ack(3,11))