python课后作业006讲,请问我是哪里错了呀
scores=int(input('请输入你的分数:'))if scores<60:
print('D')
elif 80>scores>=60:
print('C')
elif 90>scores>=80:
print('B')
elif 100>scores>=90:
print('A')
elif scores==100:
print('S') 代码格式化。
if elif 对齐 本帖最后由 liuhongrun2022 于 2023-1-27 20:29 编辑
请把代码对齐
scores=int(input('请输入你的分数:'))
if scores<60:
print('D')
elif 80>scores>=60:
print('C')
elif 90>scores>=80:
print('B')
elif 100>scores>=90:
print('A')
elif scores==100:
print('S')
有用请设置“最佳答案”! liuhongrun2022 发表于 2023-1-27 20:28
请把代码对齐
有用请设置“最佳答案”!
但是这是它自动给我变成这样的呀 本帖最后由 liuhongrun2022 于 2023-1-27 21:37 编辑
Gigi233 发表于 2023-1-27 21:29
但是这是它自动给我变成这样的呀
你在打完print()之后
请把缩进删掉 ba21 发表于 2023-1-27 20:13
代码格式化。
if elif 对齐
我打的时候它自动给我弄成这样的 liuhongrun2022 发表于 2023-1-27 21:29
你在打完print()之后
请把缩进删掉
好的 明白了 谢谢!
页:
[1]