手记

python--练习--for i in range(2,101)

#!/usr/bin/python3
total1=0
total2=0
for i in range(2,101):
if i%2==0 :
total1+=i

else:    total2+= -i

total=total1+total2

print(total)

0人推荐
随时随地看视频
慕课网APP