Python期末考试成绩评定程序:自动判定优良中差
score = float(input('请输入期末考试成绩:'))
if score >= 90 and score <= 100: print('优') elif score >= 80 and score < 90: print('良') elif score >= 70 and score < 80: print('中') elif score >= 60 and score < 70: print('差') elif score >= 0 and score < 60: print('不合格') else: print('你输入的数据不合理!')
原文地址: https://www.cveoy.top/t/topic/oEJ6 著作权归作者所有。请勿转载和采集!