python - 基础算法题3 - 对1~100所有数奇数和

count=1
sum=0
while count<=100:
    sum+=count
    count+=2
print(sum)

 

转载于:https://www.cnblogs.com/bigbigbird/p/11170789.html

你可能感兴趣的:(python)