大佬們幫幫python小白吧
加了一上午也不對
怎樣才能提示錯誤之后重新輸入呀
萬分感謝

uj5u.com熱心網友回復:
這里是C/C++區……uj5u.com熱心網友回復:
score = int(input("請輸入成績(按<ESC>和回車鍵退出):"))while score not in range(0, 101):
print("成績有誤,請重新輸入:")
score = int(input("請輸入成績(按<ESC>和回車鍵退出):"))
if score in range(90, 101):
print("A")
elif score in range(80, 90):
print("B")
elif score in range(70, 80):
print("C")
elif score in range(60, 70):
print("D")
else:
print("E")
uj5u.com熱心網友回復:
萬分感謝轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/71976.html
上一篇:揭秘|一探騰訊基于Kubeflow建立的多租戶訓練平臺背后的技術架構
下一篇:Python
