猜數字遊戲

class GuessGame:
    sysNum = 199
    def __init__(self,num):
        self.sysNum = num
    def thread(self):
        while 1<3:
            yourNum = int(input('input your number:'))
            if yourNum > self.sysNum:
                print('大了')
                continue
            elif yourNum < self.sysNum:
                print('小了');continue
            else :
                print('you win')
                break
    def start(self):
        self.thread()input

cc = GuessGame(355)
cc.start()
       
        it

相關文章
相關標籤/搜索