Python 入門指南 5.0

exercise0608.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 使用者輸入分數
score = int(input("請輸入分數:"))

# 依分數印出評語
if score == 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!!")

# 檔名: exercise0608.py
# 說明:《Python入門指南》的練習
# 網站: http://kaiching.org
# 作者: 張凱慶
# 時間: 2023 年 8 月

回到練習題目
上一頁 exercise0607.py
回 Python 入門指南 5.0 首頁
下一頁 exercise0609.py
回 Python 教材首頁
回程式語言教材首頁