Python
import random as r secret = r.randint(1,100) while True: guess = input() guess = int(guess) if guess < secret: print('你猜的数太小了') elif guess > secret: print('你猜的数太大了') else: print('太棒了,猜对了') break