陷入了一个真实的循环中,我似乎无法理解

2024-06-20 15:15:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我陷入了一个我似乎无法打破的真实循环,有什么建议吗

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())

Tags: andofthenumberinputonrouteint