summaryrefslogtreecommitdiff
path: root/progs/a456.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a456.py')
-rw-r--r--progs/a456.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/progs/a456.py b/progs/a456.py
new file mode 100644
index 0000000..bb16096
--- /dev/null
+++ b/progs/a456.py
@@ -0,0 +1,9 @@
+def power(a,b):
+ if b==0:
+ return 1
+ elif a==0:
+ return 0
+ elif b==1:
+ return a
+ else:
+ return a*power(a,b-1) \ No newline at end of file