请用python写出考试成绩的问题:提示用户输入成绩,判断是属于哪个水平,将结果打印到控制台。60以下不及格,60分以上为及格,70分至80分为合格,80分至90分为良好,90分以上为优秀。
时间: 2024-05-25 17:18:22 浏览: 16
score = float(input("请输入成绩:"))
if score < 60:
print("不及格")
elif score >= 60 and score < 70:
print("及格")
elif score >= 70 and score < 80:
print("合格")
elif score >= 80 and score < 90:
print("良好")
else:
print("优秀")
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![py](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![asm](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![apk](https://img-home.csdnimg.cn/images/20210720083646.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)