python loops
a command within a loop statement in computer code that stops a loop without executing a loop else statement
break
if an infinite loop occurs, what keystrokes will allow terminal to abort the script but remain running ?
control-c
ff counter = 0 to start a loop, what loop code (shortest possible) will add 1 to counter on each iteration ?
counter += 1
the statement that executes if the loop condition becomes false
else
a repeating section of code that repeats until a counter reaches its limit
for loop
what's the correct syntax for the statement to loop from 0 to 10 (including 10) ?
for x in range(11):
symbols used in Python to add the number on the right to the left and change the number on the left to the result
+=1
what symbol ends all loop condition statements ?
:
a loop where the original condition never becomes false and the loop iterates over and over forever
infinite
a single repetition of a loop in Python
iteration
a single data set of an associative array or dictionary
key-value pair
a control structure in Python that executes the same lines of code multiple times until a starting condition becomes false
loop
what danger do loops pose to computers ?
they can become infinite
what's the purpose of a break statement
to stop looping without else
which loops are in greater danger of becoming infinite - for or while?
while
a section of code that repeats as long as a condition is true (but does not count through a range)
while loop
what's the correct statement for looping while x < 5 ?
while x < 5:
a function that unites two lists for the purpose of passing them through a loop for the sake of comparison
zip()
what function combines lists and allows a single loop to compare them ?
zip()
