import random number = random.randint(1,50) num = 5 const = 0 while True: num = num - 1 guess = input("请输入你猜的数字(1——50):") const = const + 1 if number == int(guess): print("猜对了,你真胖(棒)!") print("猜") print("猜对") print("猜对了") print("猜对了,") print("猜对了,你") print("猜对了,你真") print("猜对了,你真胖") print("猜对了,你真胖(棒)") print("猜") print("猜") print("猜") print("猜") print("猜") print("猜") print("猜") break elif num == 0: print("没有机会了,重新来一盘吧!") break else: if number > int(guess): print("数字过小") if number < int(guess): print("数字过大")