条件分支语句

score = 95

if score >= 60:

if score >= 70:

if score >= 80:

if score >= 90:

print 'you score level is A'

else:

print 'you score level is B'

else:

print 'you score level is C'


else:

print 'you score level is D'


else:

print 'you have many space to improve'


while循环语句 

----------------循环打印1-100---------------

i = 0

while i < 100:

i += 1

print i

----------------打印1-100间的奇数-----------

i = 1

while i < 100:

 if i%2 == 1:

 print i

 i +=1

----------------打印1-100间的3的倍数-----------

i = 1

while i < 100:

 if i%3 == 0:

 print i

 i +=1