if elif else 使用

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

1 #!/usr/bin/env python
  2 while True:
  3 
  4     score=int(raw_input('please input your score(0-100): '))
  5     if score >=90 and score <=100:
  6         print 'your are A type'
  7     elif 80<=score<=89:
  8         print 'you are B type'
  9     elif 70<=score<=79:
 10         print 'you are C type'
 11     elif 60<=score<=69:
 12         print 'you are D type'
 13     elif 0<=score<60:
 14         print 'you are F type'
 15     else:
 16         print 'you are input a wrong score.'