我们根据输入的类型执行两个循环中的一个。
We execute one of two loops, depending on the type of input.
WHILE循环扫描输入阵列;在元素以所需的区域代码开始时,将其添加到输出阵列。
The WHILE loop scans the input array; when an element begins with the required area code, it is added to the output array.
程序将不断循环,直至输入匹配字符的有效密码和总输入时间。
The program will loop continuously until a valid password in character matching and total time of entry is entered.
But if it is not, it's going to print out a message here saying, you screwed up, somewhat politely, and it's going to go back around. So it'll just cycle until I get something of the right type.
但是输入不是浮点数的话,我这里就会显示一个消息说,你搞砸了,该稍微有点礼貌吧?,然后我们继续执行循环,一直到得到正确类型的输入。
I'm going to run through a loop, and I'm going to request some input, which I'm going to read in with raw input.
我要运行一个循环,我需要一些输入,需要读入一些原始的输入。
I probably whip out a do while loop very rarely, but very often when programming games or any program that takes user input and has to check that user input and yell at the user if they're messing with you or aren't providing what's expected.
我可能很少用do,while,循环,但常常是,当编制程序游戏或需要用户输入的程序是,需要检查用户的输入并提醒用户,如果他们干扰了你,或没有提供所期望的输入。
应用推荐