标签:user int == put break 数字 游戏 inpu print
import random
n = random.randint(20,30)
count = 0
age_l = ‘‘‘
-------
age : %i
-------
‘‘‘ %(n)
while count < 3:
count += 1
user = int(input("请输入:"))
if user > n:
print("big")
elif user < n:
print("small")
else:
print("yes")
break
if count == 3:
user_l = input("是否继续y/n:")
if user_l == "n" or user_l == "N":
break
elif user_l == "y" or user_l == "Y":
count = 0
print(age_l)
标签:user int == put break 数字 游戏 inpu print
原文地址:https://www.cnblogs.com/745728806-qq/p/11620237.html