diff options
Diffstat (limited to 'progs/a525.py')
-rw-r--r-- | progs/a525.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/progs/a525.py b/progs/a525.py new file mode 100644 index 0000000..06cd0a5 --- /dev/null +++ b/progs/a525.py @@ -0,0 +1,5 @@ +def sum_series(n):
+ if n < 1:
+ return 0
+ else:
+ return n + sum_series(n - 2)
\ No newline at end of file |