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