python入門--猜數字遊戲

代碼 import random num = random.randint(1, 100)  # 獲得一個隨機數 is_done = False  # 是否猜中的標記 count = 0  # 玩家猜了幾次 while not is_done:     guess = int(input('請輸入一個[1, 100]的整數:'))     if guess == num:         is_d
相關文章
相關標籤/搜索