Python基础-while奇数和

利用while循环计算100*座位号 以内奇数的和。

1 n = 1
2 s = 0
3 SeatID=1
4 while n <= 100*SeatID:
5     s += n
6     n += 2
7 
8 print '奇数的和:%d'%(s)