diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2022-02-27 12:52:55 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-27 12:52:55 +0000 |
| commit | 5b198e2344a40254c859166f83e9a1836ec7a248 (patch) | |
| tree | cad8032021393c70b08b134209b33049df91c74e /challenge-153/sgreen/python/ch-1.py | |
| parent | 69f7b1bee1117ea3ec8f7701570e5c85d8147e90 (diff) | |
| parent | ffcd75115810ad7757864de93b29ce8b829750bd (diff) | |
| download | perlweeklychallenge-club-5b198e2344a40254c859166f83e9a1836ec7a248.tar.gz perlweeklychallenge-club-5b198e2344a40254c859166f83e9a1836ec7a248.tar.bz2 perlweeklychallenge-club-5b198e2344a40254c859166f83e9a1836ec7a248.zip | |
Merge pull request #5710 from simongreen-net/master
sgreen solutions to challenge 153
Diffstat (limited to 'challenge-153/sgreen/python/ch-1.py')
| -rwxr-xr-x | challenge-153/sgreen/python/ch-1.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-153/sgreen/python/ch-1.py b/challenge-153/sgreen/python/ch-1.py new file mode 100755 index 0000000000..453072fc92 --- /dev/null +++ b/challenge-153/sgreen/python/ch-1.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +import math + +def main(): + solutions = [1] + for i in range(1, 10): + solutions.append(solutions[-1]+math.factorial(i)) + + print(*solutions, sep=', ') + +if __name__ == '__main__': + main()
\ No newline at end of file |
