Python 练习实例452025-07-14 17:33•Python2.x•阅读 Python 100例题目:统计 1 到 100 之和。程序分析:无程序源代码:实例#!/usr/bin/python# -*- coding: UTF-8 -*-tmp = 0foriinrange(1,101): tmp += iprint('The sum is %d' % tmp)以上实例输出结果为: The sum is 5050 Python 100例