[求助]求大神指点
python3吧
全部回复
仅看楼主
level 1

import random
while(1):
b=int(random.randint(1,10))
c=input("c请输入头的数目")
while str.isdigit(c):
c=int(c)
if 1<=c<=10:
d=c-1
c="tmp"
print(b,c,d) #
else:
c=input("c1请输入头的数目")
a=input("a1请输入头的数目")
while str.isdigit(a):
a=int(a)
if d<0: #问一下怎么判定失败,之后便跳到最开始
f=1 #
else:#
print("lost") #
if a<b:
print("small")
d=d-1
print(a,b,c,d)#
a=input("a2请输入头的数目")
elif a>b:
print("big")
d=d-1
print(a,b,c,d)#
a=input("a3请输入头的数目")
else:
print("nice")
a="tmp"
2021年01月01日 06点01分 1
level 1
2021年01月01日 06点01分 2
level 11
在你想结束返回上一级which的地方单独写行 break
2021年01月01日 08点01分 3
谢谢
2021年01月01日 12点01分
1