Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python while loop

x = 0

while x < 5:	# This is the loop condition, the loop will repeat WHILE thid condition is true
	print(x)
    x += 1
	if x == 3:
    	break	# This break statment will end the loop no matter what
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #loop
ADD COMMENT
Topic
Name
9+6 =