CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
jackfrued

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: jackfrued/Python-100-Days
Path: blob/master/Day01-15/code/Day04/for3.py
Views: 729
1
"""
2
输入非负整数n计算n!
3
4
Version: 0.1
5
Author: 骆昊
6
Date: 2018-03-01
7
"""
8
9
n = int(input('n = '))
10
result = 1
11
for x in range(1, n + 1):
12
result *= x
13
print('%d! = %d' % (n, result))
14
15