Answers A+ Grade 100%.
The structure that allows one set of instructions to operate on multiple, separate sets of data is the
- loop
Which of the following is not a step that must occur in every loop? - set the loop control value
equal to a sentinel
The statements executed within a loop are known collectively as the - loop body
A counter keeps track of - the number of times an event has occurred
Adding 1 to a variable is also called - incrementing it
Subtracting 1 from a variable is called - decrementing it
When you know the number of times a loop will execute when a program runs, it is a - definite
loop
In the following pseudocode, what is output if a=1, b=2, and c=5?
while a<c
a=a+1
b=b+c
endwhile
output a, b, c - 5, 22, 5
In the following pseudocode, what is output if d=4, e=6, and f=7?
while d>f
d=d+1
e=e-1
endwhile
output d, e, f - 4, 6, 7
In the following pseudocode, what is output if g=4 and h=6?
while g<h
g=g+1
endwhile
output g, h - 6, 6
Most programmers use a for loop - when they know the exact number of times a loop will repeat
When two loops are nested, the loop that is contained by the other is the - inner loop
When two loops are nested, the loop that is containing the other is the - outer loop