# 4、额,来个小插曲,写程序求出1-100的累加和。1+2+3+4+5+.....+100。#1sum =0i = 1while i<=100: sum = sum + i i+=1 print(sum)
#2sum = 0for i in range (1,101): sum = sum+i print(sum)