当前位置:天才代写 > tutorial > Python教程 > python if elif else 使用

python if elif else 使用

2018-05-17 08:00 星期四 所属: Python教程 浏览:843

python">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.'

标签:python

 

    关键字:

天才代写-代写联系方式