练习2:数列求和 7.10
Python
total = 0 # 初始化累加器
for i in range(1, 101):
total = total + i # 等价于 total += i
print("1到100的和是:", total)