kuroko/test/testLoopBreaks.krk

29 lines
539 B
Python
Raw Permalink Normal View History

2020-12-31 10:59:51 +03:00
let x = 1
while True:
x = x + 1
if x > 20:
break
if x > 15:
let y = 0
while True:
y = y + 1
print("[ y = ",y,"]")
2020-12-31 10:59:51 +03:00
if y == x:
break
print("y = ",y)
2020-12-31 10:59:51 +03:00
if x > 10:
print("not going to print this one :)")
2020-12-31 10:59:51 +03:00
continue
print("x = ",x)
print("hello",x)
2020-12-31 10:59:51 +03:00
for i in [1,2,3,4,5,6]:
if i == 2:
print("skipping 2")
2020-12-31 10:59:51 +03:00
continue
if i == 4:
print("4? ending early!")
2020-12-31 10:59:51 +03:00
break
print(i * 5)
print("Done")