代码语言:javascript复制
x=10 #the number you set to gess
i=1
n=6
while(i<=6):
print("@_@:")
print(n)
print(" times left")
y = input("please input the number you guess:")
y = int(y)
if(y == x):
print("@_@:")
print("you win")
break
elif(y > x):
print("@_@:")
print("the number you guess is a little bigger")
elif(y < x):
print("@_@:")
print("the number you guess is a little less")
i = i 1
n = n - 1
else:
print("@_@:")
print("times use up,you lose")