Article Outline
Python example 'python-example-25'
python-example-25
Python example: python-example-25
#!/usr/bin/python
# -*- coding: UTF-8 -*-
n = 0
s = 0
t = 1
for n in range(1,21):
t *= n
s += t
print('1! + 2! + 3! + ... + 20! = %d' % s)
Useful links
- Learn Python: https://pythonbasics.org/
- More Python: https://pythonprogramminglanguage.com