```python
获取用户输入的成绩
score = float(input("请输入学生的成绩:"))
判断成绩等级
if score >= 90:
grade = "A"
elif score >= 80:
grade = "B"
elif score >= 70:
grade = "C"
elif score >= 60:
grade = "D"
else:
grade = "E"
输出成绩等级
print("学生的成绩等级为:", grade)
这个代码首先通过`input`函数获取用户输入的成绩,并将其转换为浮点数类型。然后使用`if-elif-else`语句来判断成绩等级,并输出相应的等级。