if elif else 使用

2015-11-08 0 662
if elif else 使用
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 if elif else 使用 http://www.ox520.com/15896.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务