SUS1501 Assignment 5 (COMPLETE
ANSWERS) Semester 2 2024 - DUE 16
September 2024 ; 100% TRUSTED
Complete, trusted solutions and
explanations.
, A loop that repeats a specific number of times is known as a(s)
Select one:
A. count-controlled.
B. pretest.
C. infinite.
D. conditional. - CORRECT ANSWERS-count-controlled
Select all that apply. Which of the following steps is normally performed by a for loop?
Select one or more:
A. update the control variable during each iteration
B. terminate when the control variable reaches its maximum or minimum value
C. test the control variable by comparing it to a maximum or minimum value
D. initialize the control variable to a starting value - CORRECT ANSWERS-all do
A ________ loop will always be executed at least once
Select one:
A. pretest
B. posttest
C. user-controlled
D. conditional - CORRECT ANSWERS-posttest
A ________ is a value that signals when the end of a list of values has been reached.
A. sentinel
B. terminal
C. token
D. delimiter - CORRECT ANSWERS-sentinel
Before entering a loop to compute a running total, the program should first
select one
A. read all the values into main memory.
B. know exactly how many values there are to total.
C. set all variables to zero.
D. set the accumulator variable to an initial value, often zero. - CORRECT ANSWERS-
set the accumulator variable to an initial value, often zero.
ANSWERS) Semester 2 2024 - DUE 16
September 2024 ; 100% TRUSTED
Complete, trusted solutions and
explanations.
, A loop that repeats a specific number of times is known as a(s)
Select one:
A. count-controlled.
B. pretest.
C. infinite.
D. conditional. - CORRECT ANSWERS-count-controlled
Select all that apply. Which of the following steps is normally performed by a for loop?
Select one or more:
A. update the control variable during each iteration
B. terminate when the control variable reaches its maximum or minimum value
C. test the control variable by comparing it to a maximum or minimum value
D. initialize the control variable to a starting value - CORRECT ANSWERS-all do
A ________ loop will always be executed at least once
Select one:
A. pretest
B. posttest
C. user-controlled
D. conditional - CORRECT ANSWERS-posttest
A ________ is a value that signals when the end of a list of values has been reached.
A. sentinel
B. terminal
C. token
D. delimiter - CORRECT ANSWERS-sentinel
Before entering a loop to compute a running total, the program should first
select one
A. read all the values into main memory.
B. know exactly how many values there are to total.
C. set all variables to zero.
D. set the accumulator variable to an initial value, often zero. - CORRECT ANSWERS-
set the accumulator variable to an initial value, often zero.