aboutsummaryrefslogtreecommitdiff
path: root/challenge-153/abigail/python/ch-1.py
blob: 6f287fa1291bb643fc3cd2686ef492fdddba0f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/local/bin/python3

#
# See https://theweeklychallenge.org/blog/perl-weekly-challenge-153
#

#
# Run as: python ch-1.py
#

import sys;

fac = 1
sum = 1

sys . stdout . write (str (sum))

for n in range (1, 10):
    fac = fac * n
    sum = sum + fac
    sys . stdout . write (" " + str (sum))

sys . stdout . write ("\n")