loop Be sure to indent the statements to repeat in the loop Let's see examples. #1 print all even numbers from 1 to 20 number = 2 # initialize the number we want to print while number <= 20: print ...
Yes/No’ say what the total is This algorithm would keep iterating until the answer at the end of the loop is ‘No’, ie it will continue to iterate WHILE there are more numbers to add.
一些您可能无法访问的结果已被隐去。
显示无法访问的结果