while break continue else

i = 1
while i < 6:
  print(i)
  i += 1

i = 1
while i < 6:
  print(i)
  if (i == 3):
    break
  i += 1
  
i = 0
while i < 6:
  i += 1
  if i == 3:
    continue
  print(i)
  
i = 0
while i < 10:
  i += 1
  if 6 <= i <= 7:
    continue
  print(i)
  
i = 1
while i < 6:
  print(i)
  i += 1
else:
  print("i is no longer less than 6")
  

<?php
     echo shell_exec("python py/while.py");
?>

(note that number 6 and 7 are missing in the result)

up