# 1+2+3+4+5+6+.....+100 = ?#关键在于,当n为时,才print(s)n = 1s = 0while n < 101: s = s + n if n ==100: #关键在于这一步, 我用if来判断,当n为100时,才print(s), 否则继续while循环 print(s) n = n + 1