Python 入門指南 5.0
exercise2407.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 | # 從 exercise2301 引入 Guess
from exercise2301 import Guess
# 從 exercise2304 引入 GuessUser
from exercise2304 import GuessUser
# 從 exercise2306 引入 GuessGame
from exercise2306 import GuessGame
# 執行部分
if __name__ == '__main__':
g = GuessGame("小明")
check = ""
while True:
g.playgame()
check = input("按下 Enter 結束遊戲,或進行下一輪請輸入 y 或 Y :")
if check == "y" or check == "Y":
continue
else:
break
# 檔名: exercise2407.py
# 說明:《Python入門指南》的練習
# 網站: http://kaiching.org
# 作者: 張凱慶
# 時間: 2023 年 10 月
|