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 ...
If the condition is never met, then the program loops infinitely. Consider this simple algorithm to count up in twos from one to a hundred: the variable ‘count’ is set to 1 the ‘while ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果