summaryrefslogtreecommitdiff
path: root/progs/a929.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a929.py')
-rw-r--r--progs/a929.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/a929.py b/progs/a929.py
new file mode 100644
index 0000000..1ae5aa1
--- /dev/null
+++ b/progs/a929.py
@@ -0,0 +1,5 @@
+def sum_digits(n):
+ if n == 0:
+ return 0
+ else:
+ return n % 10 + sum_digits(int(n / 10)) \ No newline at end of file