s = 0
i = 1
while i <= 100: # # 偏C++编写分格
s +=i
i +=1
print('求100以内的和',s) # 求100以内的和 5050
for i in range(101): #比较pythonic
s += i
print('求两个100以内的和',s) # 求两个100以内的和 10100
list1 = [i for i in range(101)] # 很pythonic
a = sum(list1)
print('用列表求和',a) # 用列表求和 5050