Home > other > For help: the problem of the while loop
For help: the problem of the while loop
Time:09-29
Written the following code, don't understand why the input for the first time are not performed while the print command; But in the second input to print, Can someone help to point out where there is a problem?
CodePudding user response:
Process The first is the while input (* * * *)!="* * *" To perform the input, waiting for input, Enter aa Judgment is not equal to quit Began to perform a print (input (* * *)) First the input waiting for input Enter AA Print the AA The next cycle
CodePudding user response:
You use, the first is the content of the input while statement in the input (prompt), then the while loop in comparison, displays the contents of a second prompt again, now you just to input the content of the print () function to print; Simple, you of the program, two other inputs to calculate a while loop,
CodePudding user response:
Def replay () : Prompt='Tell me something, and I will repeat it back to you.' The content=input (prompt + "\ n the enter" quit "to end the talk:") While the content! :='quit' Print (content) Return replay ()