提示错误为: TypeError: '>=' not supported between instances of 'str' and 'int'
因为 input 接收到的都是字符串类型,解决方案是转变字符类型。
score=int(input ("请输入你的成绩:"))
if score >= 90:
print('优秀')
elif score < 90 and score>=80:
print('良好')
elif score < 80 and score>=60:
print('及格')
else:
print('不及格')

相关文章:

  • 2022-12-23
  • 2021-04-20
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-14
  • 2022-12-23
  • 2021-09-25
  • 2021-10-07
  • 2021-07-08
相关资源
相似解决方案