输入语文成绩、数学成绩、英语成绩,计算出平均成绩,评定成绩等级。请使用f-string进行输出,并在f-string中对平均成绩保留1位小数。 优秀:90<= score <=100 良好:80<= score < 90 中等:60<= score < 80 较差:0<= score < 60
时间: 2023-05-13 07:06:25 浏览: 39
C语言成绩评定办法-综合文档
好的,我可以回答这个问题。以下是代码:
```python
chinese_score = float(input("请输入语文成绩:"))
math_score = float(input("请输入数学成绩:"))
english_score = float(input("请输入英语成绩:"))
average_score = (chinese_score + math_score + english_score) / 3
grade = ""
if 90 <= average_score <= 100:
grade = "优秀"
elif 80 <= average_score <
阅读全文