編寫程序實現根據考試成績將成績分為A,B,C,D四檔。


score = float(input("請輸入你的成績:"))
if 90 <= score <= 100:
print("你的成績為A檔")
elif 80 <= score < 90:
print("你的成績為B檔")
elif 70 <= score < 80:
print("你的成績為C檔")
elif 60 <= score < 70:
print("你的成績為D檔")
else:
print("對不起,你的成績不合格!")


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM