Please enable JavaScript.
Coggle requires JavaScript to display documents.
control structure - Coggle Diagram
control structure
Loops
execute a block of code a number of time
Each time the set of instructions is executed
it is called iteration
For loop1
loop over the items in a sequence
for alpha-bat on at a time of one line
the range function2
iterate over a sequence of
numbers.
consecutive number in each line
while loop 3
e number of iterations is unknown. It will execute a block as
long as a given condition is true.
note : just give a sequence and number to produced
break 4
exit the while loop even when the condition is true
stop everything
selection or condition statements
IF
test to see if one condition is true or false
only execute if the condition is true.
IF ELSE
execute a block when a condition is true
and an alternative block if the condition is false.
Note : if the condition does not fit with the program
execute a
particular block of code based on the result from some test/condition.