n=int(0)
z=int(6)
import random
rand_num = int(0)
rand_num = random.randint(0, 100)
while True:
n=int(input("猜一个数字:"))
if n > rand_num:
print("大了!")
z-=1
print("还剩",z,"次机会")
if n < rand_num:
print("小了!")
z-=1
print("还剩",z,"次机会")
if n == rand_num:
print("正确!")
break
if z < 1:
print("机会用完了,你输了!")
break