Python 入門指南 5.0
exercise1109.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 指派直接比較 if (score := int(input("請輸入分數:"))) == 100: print("Perfect!") elif 90 <= score < 100: print("Excellent!") elif 80 <= score < 90: print("Great!") elif 70 <= score < 80: print("Good!") elif 60 <= score < 70: print("Not Bad!") elif 0 <= score < 60: print("Bad!") else: print("That's impossible!!") # 檔名: exercise1109.py # 說明:《Python入門指南》的練習 # 網站: http://kaiching.org # 作者: 張凱慶 # 時間: 2023 年 9 月 |