true spam print('helloworld 'spam spam false end figure - the flowchart for the while statement code the code with the if statement checks the conditionand it prints helloworld only once if that condition is true the code with the while loopon the other handwill print it five times the loop stops after five prints because the integer in spam increases by one at the end of each loop iterationwhich means that the loop will execute five times before spam is false in the while loopthe condition is always checked at the start of each iteration (that iseach time the loop is executedif the condition is truethen the clause is executedand afterwardthe condition is checked again the first time the condition is found to be falsethe while clause is skipped an annoying while loop here' small example program that will keep asking you to typeliterallyyour name select file new to open new file editor windowenter the following codeand save the file as yourname pyname 'while name !'your name'print('please type your name 'name input(print('thank you!'you can view the execution of this program at firstthe program sets the name variable to an empty string this is so flow control