i=0 s=0 while i <=100: s=s+i i=i+1 print(s)
运行后提示语法无效,试了in range也是报错 
sum没有定义
# Enter a codenum=1sum=1while num<=10: sum=sum*num num+=1print(sum)
试试加个sum=0
i=0
s=0
while i <=100:
s=s+i
i=i+1
print(s)