0
我被困在一段时间真环路,我似乎无法打破,任何建议,请:卡在一段时间真环路,我似乎无法打破
minstops = 1
maxstops = 100
minpass = 0
maxpass = 35
print ("Please enter the route number")
route = input()
print("Please enter number of stops on" , route,".")
stops = int(input())
while stops != "x":
while True:
if stops >= minstops and stops <= maxstops:
break
else:
print ("Please enter a number between",minstops,"and",maxstops,".")
print ("Please enter the number of people already on",route,".")
numofpassonbus = int(input())
你的循环内部哪里是停止*改变*? –
stops是一个'int()',你为什么要把它与'“x”'比较? –
另外,你有**两个''while''循环,移除外层,它没有任何用处。当您将其转换为“int”时,'stops'永远不会等于一个字符串。 –