用户:尚轩滨_原跑酷喵查看:1 回复:1 评论:1 创建时间:2020-07-17T17:10:09
【作品展示】

【作品介绍】
这个程序可以计算出累加和,连乘,可以帮我们计算累加和,连乘,这个程序帮助了我们计算
【作品源代码】
#极速运算
import time
summation = 0
product = 1
start = time.process_time()
for i in range(1,10001):
summation +=i
product = product * i
print('1到10000的累加和:',summation)
print('1到10000的连乘:',product)
now = time.process_time()
print(now-start)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn