1. 使用內建函數range函數
print sum(range(1,101))
2. 使用函數reducespa
print reduce(lambda a,b:a+b,range(1,101))
3. 使用循環code
n = 0 for x in range(101): n = x + n