Loops jython输入验证,而循环映射
我尝试使用while-true循环,因此如果在用户尝试输入时使用负整数,它将退出菜单,我的问题在于我的第二次迭代要求用户输入 我的第一次迭代:Loops jython输入验证,而循环映射,loops,input,while-loop,jython,exit,Loops,Input,While Loop,Jython,Exit,我尝试使用while-true循环,因此如果在用户尝试输入时使用负整数,它将退出菜单,我的问题在于我的第二次迭代要求用户输入 我的第一次迭代: choice=1 while choice1>=0: choice1=requestInteger("Please enter the first city you would like to visit") while(choice1>9): choice1=requestInteger("Error, Pl
choice=1
while choice1>=0:
choice1=requestInteger("Please enter the first city you would like to visit")
while(choice1>9):
choice1=requestInteger("Error, Please enter a city that corresponds with the number on the map")
我的第二次迭代直接在下面:
while choice2>=0:
choice2=requestInteger("Please enter the first city you would like to visit")
while(choice1>9):
choice1=requestInteger("Error, Please enter a city that corresponds with the number on the map")
第三:
choice3=1
while (choice3>0):
choice3=requestInteger("Please enter another city you would like to visit")
while(choice3>9):
choice3=requestInteger("Error, Please enter a city that corresponds with the number on the map")
第二次迭代从不循环,而是继续循环到第一次循环。我怎样才能解决这个问题