條件分支語句
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