用Python實現猜數遊戲

# -*- coding: utf-8 -*- import random guess = random.randint(10,100) print('猜數遊戲!') SUM = 0 while(1): a = input('請輸入一個整數:') if(a == '退出'): exit(0) elif(int(a) > guess): print('偏大!') SUM = SUM
相關文章
相關標籤/搜索